zsh-workers
 help / color / mirror / code / Atom feed
* What's the last command in prompt expansion?
@ 2009-12-14 22:53 Jörg Sommer
  2009-12-15 10:02 ` Peter Stephenson
  0 siblings, 1 reply; 4+ messages in thread
From: Jörg Sommer @ 2009-12-14 22:53 UTC (permalink / raw)
  To: zsh-workers

Hi,

what should be the expansion of %? in the prompt, the return code of the
last command run at the prompt or the return code of the last command run
by zsh?

I've a function triggered via TRAPALARM that modifies PS1, by resetting
its value and running zle reset-prompt. After the first time this
function was executed the return value isn't the one of the last command,
e.g. it's not 1 after executing false.

Do I have to save the return value and put the value into PS1?

Regards, Jörg.
-- 
“Politics is for the moment, equations are forever”
            (Albert Einstein)


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

end of thread, other threads:[~2009-12-18 23:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-14 22:53 What's the last command in prompt expansion? Jörg Sommer
2009-12-15 10:02 ` Peter Stephenson
2009-12-15 10:23   ` Peter Stephenson
2009-12-18 16:45     ` Jörg Sommer

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