Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: POSIX_ARGZERO: not POSIX compliant in sourced script?!



Thanks for fixing this!

(Reference: Git commit 03e53c8)


Regards,
Daniel.

On 12.09.2014 05:59, Bart Schaefer wrote:
> 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;
> 



Messages sorted by: Reverse Date, Date, Thread, Author