Re: $PROMPT_COMMAND (WAS: Re: Using $PROMPT_COMMAND to beep depending on success/failure)

Tony Baechler <[email protected]>
Newsgroups gmane.linux.redhat.blinux.general
Organization Baechler Access Technology Services
Message-ID <[email protected]>
On 4/22/2016 2:09 PM, Lars Bjørndal wrote:
> Do any of you know of a way to get a number as the first cell(s)
> in the prompt indicating the error code of the previous command? E.g.
>
> 1[user@host ~]#
>
> if something gets wrong? If zero, I'd like to get no number output.
> I think that could be convenient when using braille.


There is probably a way in bash, like echoing $? at the beginning of the 
prompt. However, mksh does that automatically. I think zsh does as well.

_______________________________________________
Blinux-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/blinux-list
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.