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

Re: reinventing print_exit_value



Nikolai Weibull wrote:
> Christian Taylor wrote:
> > 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.
>
> You know that a prompt can be more than one line, right?  Use
> $prompt_newline with the prompt module.  You can easily put the
> exit status above or below the rest of the prompt,

Yes, I could also achieve the desired output using a multi-lined prompt, but I 
would still have to perform the same check using the preexec-function that I 
mentioned in my original posting. (After just hitting enter, the exit status 
is not reset, and so it would be displayed a second time.)
The behaviour I want (and get, using the preexec-check) is:

% false
(1)
% <just hitting enter>
%

Thanks nonetheless,

Christian



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