Bug 692517
Summary: | zsh code block/pipe problem | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 5 | Reporter: | D Newport <dennis.newport> |
Component: | zsh | Assignee: | James Antill <james.antill> |
Status: | CLOSED NOTABUG | QA Contact: | BaseOS QE - Apps <qe-baseos-apps> |
Severity: | medium | Docs Contact: | |
Priority: | unspecified | ||
Version: | 5.5 | CC: | prc |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2011-03-31 19:42:16 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
D Newport
2011-03-31 13:18:44 UTC
I believe this is intentional, in that only the _last_ command in a pipe is executed within the current shell and all the others are in subshells (with a couple of optimizations, for cases zsh knows you can't tell the difference). % print $ZSH_SUBSHELL 0 % print $ZSH_SUBSHELL | cat 0 % {print $ZSH_SUBSHELL} 0 % {print $ZSH_SUBSHELL} | cat 1 % echo | cat | {print $ZSH_SUBSHELL} 0 % print_sub () { print $ZSH_SUBSHELL } % print_sub 0 % print_sub | cat 1 % echo | cat | print_sub 0 |