zsh-users
 help / color / mirror / code / Atom feed
* substituted command won't inherit stdin in pipeline
@ 2019-11-13  9:52 Oğuz
  0 siblings, 0 replies; 7+ messages in thread
From: Oğuz @ 2019-11-13  9:52 UTC (permalink / raw)
  To: zsh-users

[-- Attachment #1: Type: text/plain, Size: 453 bytes --]

On all sh implementations I have, this command

    echo foo | echo "$(cat)"

prints 'foo', except for zsh, it hangs instead. From that I gather cat
doesn't inherit echo's stdin, and it waits for input.

This works though

    echo foo | { echo "$(cat)"; }

and it doesn't make any sense, both should work as per the standard if I'm
not mistaken.

Is this a bug, or documented behavior?

---

    $ zsh --version
    zsh 5.4.2 (x86_64-ubuntu-linux-gnu)

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-11-14  9:39 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CAH7i3Lo57yAd==m7zF+8mtETqYDDSptmdzxF-2t_pu42fe9ztQ__41421.1000244663$1573638841$gmane$org@mail.gmail.com>
2019-11-13 13:00 ` substituted command won't inherit stdin in pipeline Stephane Chazelas
2019-11-13 13:30   ` Oğuz
     [not found]   ` <CAH7i3LrwD4G0CJ3WvdWZsp5u-cSTQoGomSf6HHF1XG8NnA89Vw__34634.6754276723$1573691143$gmane$org@mail.gmail.com>
2019-11-14  7:57     ` Stephane Chazelas
2019-11-14  8:43       ` Oğuz
2019-11-14  9:35         ` Peter Stephenson
2019-11-14  9:38           ` Roman Perepelitsa
2019-11-13  9:52 Oğuz

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).