Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: reinventing print_exit_value
- X-seq: zsh-users 9014
- From: Christian Taylor <cht@xxxxxxxxx>
- To: zsh-users <zsh-users@xxxxxxxxxx>
- Subject: Re: reinventing print_exit_value
- Date: Mon, 4 Jul 2005 01:04:41 +0200
- In-reply-to: <20050703223209.GA5083@xxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <200507032356.17308.cht@xxxxxxxxx> <20050703223209.GA5083@xxxxxxxxxxxxxxxx>
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