From cf69484245fa915dff7c76d22e600c926ca43200 Mon Sep 17 00:00:00 2001 From: Nathan Lasseter Date: Sun, 28 Apr 2013 12:25:50 +0100 Subject: Fixed git prompt and changed aliases --- functions/fish_prompt.fish | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'functions') 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 -- cgit v1.2.3