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

Strange function/pipestatus behavior, maybe a scope bug?



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