Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: $pipestatus broken
- X-seq: zsh-workers 19214
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Zsh workers <zsh-workers@xxxxxxxxxx>
- Subject: Re: $pipestatus broken
- Date: Mon, 3 Nov 2003 01:55:38 +0000
- In-reply-to: <1233.1067772228@athlon>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <1233.1067772228@athlon>
On Nov 2, 12:23pm, Oliver Kiddle wrote:
}
} The pipestatus array seems to be broken:
}
} % ls|cat -|cat - >/dev/null
} % echo $pipestatus
} 0
It works with "zsh -f" in the latest dev version:
zagzig% true | false |true
zagzig% echo $pipestatus
0 1 0
It fails if there's a precmd function defined:
zagzig% precmd() { echo PRECMD: $pipestatus }
PRECMD: 0
zagzig% echo $pipestatus
0
PRECMD: 0
zagzig% false | echo $pipestatus
0
PRECMD: 1 0
zagzig% echo $pipestatus
0
PRECMD: 0
I think there's code to save and restore `lastval' around precmd(), but
it doesn't save and restore the entire `pipestats' array.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author