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

$? being clobbered?



I'm having a problem with zsh, and am not sure if it's a bug or a
feature.  If I have a program executed in my prompt, its return status
clobbers the value of $?, which isn't really what I want.  Example:

> PROMPT='> '
> perl -e 'exit 42'
> echo $?
42
> PROMPT='%{$(echoti cub 80)%}> '
> perl -e 'exit 42'
> echo $?
0

Is there some way to fix this?

(zsh 4.0.7, Sven.)

-- 
...computer contrarian of the first order... / http://aperiodic.net/phil/
PGP: 026A27F2  print: D200 5BDB FC4B B24A 9248  9F7A 4322 2D22 026A 27F2
--- --
This is a one line proof... if we start sufficiently far to the left.
                       -- Cambridge University math professor
---- --- --



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