zsh-users
 help / color / mirror / code / Atom feed
* $? being clobbered?
@ 2003-07-14 17:35 Phil!Gregory
  2003-07-14 17:57 ` Michał Politowski
  2003-07-14 19:25 ` Bart Schaefer
  0 siblings, 2 replies; 4+ messages in thread
From: Phil!Gregory @ 2003-07-14 17:35 UTC (permalink / raw)
  To: zsh-users

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
---- --- --


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-07-14 19:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-14 17:35 $? being clobbered? Phil!Gregory
2003-07-14 17:57 ` Michał Politowski
2003-07-14 19:25 ` Bart Schaefer
2003-07-14 19:51   ` Phil!Gregory

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).