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

Re: exec -a and parameter expansion



On Jan 7,  6:17pm, Bart Schaefer wrote:
} Subject: Re: exec -a and parameter expansion
}
} So either there are some missing test cases for other things that
} this would cause to break, or we should rearrange execcmd() so that
} "typeset" is the only special-cased builtin ahead of prefork().

The question, I guess, is whether/how this is supposed to work:

dash_p="-p"
command $dash_p echo "what path did I search?"

dash_a="-a"
exec $dash_a $OSTYPE echo "what did I exec?"

Currently options of special builtins must only appear literally, and
both of the above would report "command not found" (unless by some odd
chance you do have commands named "-p" and "-a").

If we follow bash's example, we should indeed be performing prefork()
a lot earlier in the handling of those special builtins, but I'm not
sure about the ones that are supposed to be true parser keywords.



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