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

Re: Strange parameter visibility



On Thu, 29 Sep 2016 17:24:17 +0100
Peter Stephenson <p.stephenson@xxxxxxxxxxx> wrote:
> This isn't an optimisation gone awry --- we just plain miss out on
> checking that the LHS of the pipeline is supposed to run in the shell so
> we need to fork to do that, as we do in other cases.

This appears to be harder.

% unset x
% : ${x:=2} | echo $x
2

In this case, we don't know at the point where we start the pipeline
whether we're going to be in the current shell or not.  If the command
is external we want to keep the current code (not sure where this gets
hairy otherwise but it does).

Other cases people find are likely to be similar to this one.

pws



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