Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: POSIX_ARGZERO: not POSIX compliant in sourced script?!
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author