Earlier quoted context omitted.
Interesting. I've been using $PIPESTATUS at the start of my prompt for a while now.
I use this, which allows a similar effect but is enabled for PIPESTATUS, and also does some good things for eterm and screen. PIPESTATUS_REGEX="^ +$" # check to see if any of the pipe statuses don't start with 0 # ${_CMD_PIPESTATUS[@]#0} results in null if they all do _PIPESTATUS=" _CMD_PIPESTATUS=(\${PIPESTATUS[@]}) if [[ \"\${_CMD_PIPESTATUS[*]#0}\" && ! \"\${_CMD_PIPESTATUS[*]#0}\" =~ \$PIPESTATUS_REGEX ]] then _R…
S=(`trap -l`);e(){ for N in ${PIPESTATUS[@]};do ((N>128))&&echo ${S[$((2*N-257))]}||echo $N;done;};trap $'echo "\e[41m Exit "`e`" \e[m"' ERR