oh-my-fish/themes/uggedal/fish_right_prompt.fish
Eivind Uggedal f9e1ff0cab Minimal prompt theme.
Displays the $CWD only. If you are connected through ssh the hostname
will also be shown.

I like my prompt uncluttered. If I need to know if my git repo is
dirty I run `git st`. If I get lost and need to know which branch
I'm on it takes my fingers 2 seconds to type `git br<C-f>`.

The right prompt displays the last commands exit code if it was
non-zero. It requires a recent version of fish from git.
2013-05-10 00:20:49 +02:00

10 lines
164 B
Fish

function fish_right_prompt
set -l last_status $status
if test $last_status -ne 0
set_color red
printf '%d' $last_status
set_color normal
end
end