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

Re: processing of pipelines



Bart Schaefer wrote:

> ...
>
> Zsh *does* run the last command in a pipeline in the current
> shell when the command *is* a builtin, even if that builtin is a loop,
> which is AFAIK different from any other shell; it means that you can do
> things like
> 
>     some external command | while read line; do export $line; done
> 
> and the current shell's environment will actually be modified.
>
> ...

Only one more comment: once such a pipe is suspended, the shell
builtin/construct at the end is put in a sub-shell (and the
environment of the parent won't change any more, of course).

This has caused some trouble lately... (but you *can* suspend such
pipes and if you don't do that you can use parameters changed there -- 
its an attempt to get the best of both worlds).

Bye
 Sven


--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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