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

What's the last command in prompt expansion?



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)



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