zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Daniel Hahler <dhahler@gmail.com>,
	"Zsh Hackers' List" <zsh-workers@zsh.org>
Subject: Re: POSIX_ARGZERO: not POSIX compliant in sourced script?!
Date: Thu, 11 Sep 2014 20:59:28 -0700	[thread overview]
Message-ID: <140911205928.ZM21849@torch.brasslantern.com> (raw)
In-Reply-To: <54120100.7030803@thequod.de>

On Sep 11, 10:07pm, Daniel Hahler wrote:
}
} The option POSIX_ARGZERO (added in 19f3161 for zsh 5.0.5) does not
} appear to be fully POSIX compliant when being used in a sourced file.

Hrm.  Well, it was implemented the way it was described to us, but it
seems we need the following instead?


diff --git a/Src/init.c b/Src/init.c
index 5e92f59..d536978 100644
--- a/Src/init.c
+++ b/Src/init.c
@@ -252,8 +252,9 @@ parseargs(char **argv, char **runscript)
     paramlist = znewlinklist();
     if (*argv) {
 	if (unset(SHINSTDIN)) {
+	    posixzero = *argv;
 	    if (cmd)
-		argzero = posixzero = *argv;
+		argzero = *argv;
 	    else
 		*runscript = *argv;
 	    opts[INTERACTIVE] &= 1;

-- 
Barton E. Schaefer


  reply	other threads:[~2014-09-12  3:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-11 20:07 Daniel Hahler
2014-09-12  3:59 ` Bart Schaefer [this message]
2014-09-14  1:03   ` Daniel Hahler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=140911205928.ZM21849@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=dhahler@gmail.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).