Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Strange function/pipestatus behavior, maybe a scope bug?
- X-seq: zsh-workers 31870
- From: Ian F <in4mer@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Strange function/pipestatus behavior, maybe a scope bug?
- Date: Tue, 22 Oct 2013 11:03:07 -0700
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed;        d=gmail.com; s=20120113;        h=mime-version:from:date:message-id:subject:to:content-type;        bh=tPKYoKGf5VlF/jWdsH+5yuUgSJYmlmlM6Sgt1QSqlck=;        b=UfYhBRcpaG0Zl3Tc3kJVmpyK3+BzKsrEjgXTSWmSXWFkh8RapsmIGIW1IBshiLFFW/         34jgOV+MFPTVh17AwXOYbEIhwBZsylgmiIeB1NeYQigbczAGRPrpTHg85mlXUjCtpu+S         Wm+1Dm+NAkgYxrYawK4JcRet3mlHtLSH75LnYFbkE5uR6pAPin+OMqJtJJFSUf8lMUap         mY5jRtWRFZfgZ7WQjjiGC67yP3m3M/dbOr57i+mA4JhjDr9f9UvyAGQnr9wJzhJ/AdhT         lTDJ3emKMZbapeS6N2AhH7cSzUVaL7ntWnGjwr+9XpnmTSFdWaliGb4f/6DLI/jOYmkR         K2eg==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
Hi,
First time mailer, just subscribed.  Thanks for taking the time to read
this.
Test cases:
trueFunc() { true; }
falseFunc() { false; }
% false | true | false | true; echo $pipestatus
1 0 1 0
% false | true | false | true | trueFunc; echo $pipestatus
1 0 1 0 0
% false | true | false | true | falseFunc; echo $pipestatus
1 0 1 0 1
Potential bug case:
awkFunc() { awk; }
% false | true | false | true | awkFunc; echo $pipestatus
0
Thanks.  Also, this does not happen in bash.
%Ian
-- 
Ian F
Big hitter, the Lama
Messages sorted by:
Reverse Date,
Date,
Thread,
Author