Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
substituted command won't inherit stdin in pipeline
- X-seq: zsh-users 24420
- From: Oğuz <oguzismailuysal@xxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: substituted command won't inherit stdin in pipeline
- Date: Wed, 13 Nov 2019 12:52:20 +0300
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=xthRnLnLIHrfi+76h+kv4y3G/z+2RnXUhIIVUmetZUU=; b=IEy7EUaA6iUmALDwq8jumZ0anx9zyJJqXQXurJhbJtyh04xR6boc0Wm72dT9uWNmGm Dyxtn8Ok59RLnI9YO7B/zkBSJLxE8kwDeOSfAAyVNP755CdInXpIlBNTE0iwQQ8gyWrl iHn0hU6y9pc0S8y1yTcoTcWiuUxQPEMCpOkQD7+p11CkabzIUdF9u1cormcAhhxDpXOk hE34CEF3Ex4/3LXw12TjxlRQYpgzXflyjJ5SMu6qIxKG0IZb9T79RnqyhSVKIlp0/5iI I2ct9ve2IB2/TMHRje58+uKYcAZ2Bx4EZDaZfaPfn6moazAdvmR9x4japbiB3pARvPlP g5bQ==
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- List-unsubscribe: <mailto:zsh-users-unsubscribe@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
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)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author