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

Re: [PATCH] [RFC] Reset pipestatus in zleread



On 01/11/2018 10:22 AM, Daniel Hahler wrote:
> From: Daniel Hahler <git@xxxxxxxxxx>
> 
> What do you think about this?
> 
> I am looking at $pipestatus in my prompt precmd function, so that with
> "false | true" I would still get an indicator that (something in) the
> command failed (since $? (status) is 0 in this case).
> 
> However, with e.g. "foo=bar" (executed via execsimple) $pipestatus gets
> not reset.
> 
> This patch resets it in zleread always.
> 

Um.

% false | true
% print $pipestatus
1 0
% false | true
% foo=bar
% print $pipestatus
1 0
% ~/.local/bin/zsh
% false | true
% print $pipestatus

% false | true
% foo=bar
% print $pipestatus

%



Messages sorted by: Reverse Date, Date, Thread, Author