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

Re: reinventing print_exit_value



Nikolai Weibull wrote:
> Christian Taylor wrote:
> > I recently decided that I want the exit code of the last command (if it's
> > greater than 0) displayed after invoking it, like the PRINT_EXIT_VALUE
> > option does, but in my own format. (I don't want to include it in my
> > prompt.)
>
> Actually, you _do_ want to include it in your prompt. Simply use 
>
> %(?..status: %?)
>
> in your prompt, and it will only be displayed when there's something to
> display (non-zero exit value in this case),

I know, I tried it both in the left and the right prompt, but for some reason 
I just didn't like it. A PRINT_EXIT_VALUE-style output on an extra line suits 
me more.
This is really just cosmetics, but hey - everything else just works, where's 
the fun in that? :)

Christian



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