Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] [RFC] Reset pipestatus in zleread
- X-seq: zsh-workers 42258
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: "zsh-workers@xxxxxxx" <zsh-workers@xxxxxxx>
- Subject: Re: [PATCH] [RFC] Reset pipestatus in zleread
- Date: Fri, 12 Jan 2018 10:44:47 -0800
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=e14INLdjgl3tA1ft/GRl/rcG5ikIxqbOASdcMNdYuNc=; b=Msl9TzBgBumAKuuHSQegsBdpzK0YHdQTlN7h6Y/B7Evl+1Dx1kziGb9umW78cWKQGu d7sxo3oJzjwljoYP8lupuXwQ/BGaQJDNgS/ztJAmyl8WgQ7XnKa4OTook2unIy5QXg9U 5AEQ785bvls1xBpfq4YcvpY6cFCswLekgwx39ZL5Ur+UkukZ+OL9T1Q31CYrvdko2I8g cbFwvWXXDc5iDYUuAOzjfE/+qCbN+VigAjreASbmmzjCizIpbJEKeUly1zLjFQ6MBP35 F0oQe0rYRi2tbvzngulivax7Fq5WVt+m8Ya6VeIwxc1/vCVy9BjCiRLlusCmHOc4koZp 8ilA==
- In-reply-to: <20180111152211.18116-1-genml+zsh-workers@thequod.de>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <20180111152211.18116-1-genml+zsh-workers@thequod.de>
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