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

Re: $pipestatus broken



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