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

Re: substituted command won't inherit stdin in pipeline



On Thu, Nov 14, 2019 at 10:57 AM Stephane Chazelas <
stephane.chazelas@xxxxxxxxx> wrote:
[...]

> It's what zsh does.
>

Oh, okay then.


> IIRC, POSIX leaves it unspecified.
>
> It also leaves unspecified which pipeline component if any may
> be run in the current shell process.
>

The standard says

> Additionally, each command of a multi-command pipeline is in a subshell
> environment; as an extension, however, any or all commands in a pipeline
> may be executed in the current environment.

I thought this means each component of a pipeline should be executed in a
subshell, but as an *extension*, implementations may prefer executing some
of them in the current environment. Seems like I was wrong.

Btw, I installed a more recent version (5.7.1), and in the DESCRIPTION
section of manual it says

> It does not provide compatibility with POSIX or other shells in its
default
> operating mode...

Now this explains everything. Sorry if I wasted your time


> --
> Stephane
>


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