diff options
author | Nathan Lasseter <nathan.je.lasseter@googlemail.com> | 2013-04-28 12:25:50 +0100 |
---|---|---|
committer | Nathan Lasseter <nathan.je.lasseter@googlemail.com> | 2013-04-28 12:25:50 +0100 |
commit | cf69484245fa915dff7c76d22e600c926ca43200 (patch) | |
tree | f7ab1bf5e36861f83b81e7c0364eea33692f6b1b /functions | |
parent | ca0e20bdfe8ba9106900fe5c3bc0b3b713760cae (diff) |
Fixed git prompt and changed aliases
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 |