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

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



On Thu, Jan 11, 2018 at 7:22 AM, Daniel Hahler
<genml+zsh-workers@xxxxxxxxxx> wrote:
>
> 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).
>
> This patch resets it in zleread always.

In addition to what Eric noted, that's rather the wrong place to do
this.  Even if it solves the issue for interactive use (which it might
not), it doesn't make $pipestatus correct following assignments in
scripts.  This needs a deeper look (deeper than I have time for right
now).



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