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

Re: ZSH_SCRIPT



>>>>> On March 2, 2016 Peter Stephenson <p.stephenson@xxxxxxxxxxx> wrote:

> No, the new variables come from an argument and these are already
> metafied very early on in zsh_main by

>     for (t = argv; *t; *t = metafy(*t, -1, META_ALLOC), t++);

OK, I will change those two back to ztrdup() sans metify.
Should I add a comment to that effect?

Did you want this ztrdup in or not:

    zsh_script = ztrdup(runscript);

> Look around and you'll see none of the other uses of command line
> arguments don't get further metafied, either (including posixzero
> which is related to the new ones).

> The things that need metafying when turned into variables come from
> the environment (including the working directory).

It looks like ZSH_NAME comes from argv[0] immediately after the early
metification you pointed out above, but is being re-metified here:

    setsparam("ZSH_NAME", ztrdup_metafy(zsh_name));

Greg



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