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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Yes, with zsh that's also automatic.

On Sat, 23 Apr 2016, Tony Baechler wrote:

Date: Sat, 23 Apr 2016 07:38:11
From: Tony Baechler <tony@xxxxxxxxxxxx>
Reply-To: Linux for blind general discussion <blinux-list@xxxxxxxxxx>
To: Linux for blind general discussion <blinux-list@xxxxxxxxxx>
Subject: Re: $PROMPT_COMMAND (WAS: Re: Using $PROMPT_COMMAND to beep depending
     on success/failure)

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
Blinux-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/blinux-list

--

_______________________________________________
Blinux-list mailing list
Blinux-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/blinux-list



[Index of Archives]     [Linux Speakup]     [Fedora]     [Linux Kernel]     [Yosemite News]     [Big List of Linux Books]