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.
This commit is contained in:
Eivind Uggedal 2013-05-10 00:14:01 +02:00
parent f7bcf0c630
commit f9e1ff0cab
2 changed files with 16 additions and 0 deletions

View File

@ -0,0 +1,7 @@
function fish_prompt
if test -n "$SSH_CONNECTION"
printf '%s ' $HOSTNAME
end
printf '%s ' (prompt_pwd)
end

View File

@ -0,0 +1,9 @@
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