diff options
Diffstat (limited to 'functions')
-rw-r--r-- | functions/fish_prompt.fish | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/functions/fish_prompt.fish b/functions/fish_prompt.fish index 51dbbd7..9be04c2 100644 --- a/functions/fish_prompt.fish +++ b/functions/fish_prompt.fish @@ -4,10 +4,12 @@ function fish_prompt printf '@' printf '%s%s%s' (set_color green) (cat /etc/hostname) (set_color normal) printf '] ' - printf '%s%s' (set_color red) (pwd) + + printf '%s%s%s' (set_color red) (pwd) (set_color normal) + if git status >/dev/null ^/dev/null - printf '%s {%s}>: ' (set_color normal) (git branch | awk -F\ '{print $2}') - else - printf '%s>: ' (set_color normal) + printf ' {%s}' (git branch | grep '\*' | awk -F\ '{print $2}') end + + printf '>: ' end |