From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10812 invoked by alias); 12 Sep 2014 03:59:49 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 33143 Received: (qmail 29390 invoked from network); 12 Sep 2014 03:59:47 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,PLING_QUERY, RCVD_IN_DNSWL_NONE autolearn=no version=3.3.2 From: Bart Schaefer Message-id: <140911205928.ZM21849@torch.brasslantern.com> Date: Thu, 11 Sep 2014 20:59:28 -0700 In-reply-to: <54120100.7030803@thequod.de> Comments: In reply to Daniel Hahler "POSIX_ARGZERO: not POSIX compliant in sourced script?!" (Sep 11, 10:07pm) References: <54120100.7030803@thequod.de> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: Daniel Hahler , "Zsh Hackers' List" Subject: Re: POSIX_ARGZERO: not POSIX compliant in sourced script?! MIME-version: 1.0 Content-type: text/plain; charset=us-ascii 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