From the Canyon Edge -- :-Dustin

Friday, September 20, 2013

Byobu Prompt Now Includes Exit Code of Previous Command and ⟫

Three changes landed in Byobu yesterday, just ahead of Ubuntu 13.10 User Interface Freeze.  These are incremental changes on the work I recently introduced with Byobu's fancy new $PS1 command prompt...


  1. The prompt now shows the previous command's exit status, if it's non-zero.  This integer is the $? exit code of the previous command.  I was sitting next to Martin Pitt in New Orleans, at the Linux Plumbers conference and immediately fell in love with this idea.  How many times have we not noticed that the previous command exited non-zero...  Never again!!!
  2. The prompt now ends with ⟫ instead of ❭.  I tested every terminal I could get my hands on in Ubuntu, including: gnome-terminal, xterm, uxterm, terminator, konsole.  It turns out that the ⟫ symbol is rendered correctly in more of these (xterm and friends) than ❭.
  3. There is also a new keybinding, Alt-F5, which toggles on and off UTF-8 support in the status bar and on the PS1.  The goal here is to provide a fix and an easy escape route when you end up in a terminal that does not properly support UTF-8 out of the box (and Byobu is not able to accurately determine this), like here and here.
Of course, you can always trivially enable and disable Byobu's prompt using:

byobu-enable-prompt
and
byobu-disable-prompt

Cheers,
Dustin

No comments:

Post a Comment

Please do not use blog comments for support requests! Blog comments do not scale well to this effect.

Instead, please use Launchpad for Bugs and StackExchange for Questions.
* bugs.launchpad.net
* stackexchange.com

Thanks,
:-Dustin

Printfriendly