Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: reinventing print_exit_value
- X-seq: zsh-users 9013
- From: Nikolai Weibull <mailing-lists.zsh-users@xxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-users <zsh-users@xxxxxxxxxx>
- Subject: Re: reinventing print_exit_value
- Date: Mon, 4 Jul 2005 00:32:09 +0200
- In-reply-to: <200507032356.17308.cht@xxxxxxxxx>
- Mail-followup-to: zsh-users <zsh-users@xxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <200507032356.17308.cht@xxxxxxxxx>
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),
nikolai
--
Nikolai Weibull: now available free of charge at http://bitwi.se/!
Born in Chicago, IL USA; currently residing in Gothenburg, Sweden.
main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}
Messages sorted by:
Reverse Date,
Date,
Thread,
Author