summaryrefslogtreecommitdiff
path: root/functions/fish_prompt.fish
diff options
context:
space:
mode:
authorNathan Lasseter <nathan.je.lasseter@googlemail.com>2012-12-13 19:48:12 +0000
committerNathan Lasseter <nathan.je.lasseter@googlemail.com>2012-12-13 19:48:12 +0000
commit81c5f1b53a1cf5f5fa9aa37a895a9a84b2d2abbb (patch)
tree39b6ac304a4e2497dce8375b913f5d1fd329452b /functions/fish_prompt.fish
parente7b48b0663b3879e1d31aa604652c635493b5ca4 (diff)
parent79d992cf0c206011a878db55f40ea595a4977973 (diff)
Merge branch 'master' of github.com:User4574/FISh-Configs
Conflicts: config.fish
Diffstat (limited to 'functions/fish_prompt.fish')
-rw-r--r--functions/fish_prompt.fish6
1 files changed, 5 insertions, 1 deletions
diff --git a/functions/fish_prompt.fish b/functions/fish_prompt.fish
index 84c7e83..51dbbd7 100644
--- a/functions/fish_prompt.fish
+++ b/functions/fish_prompt.fish
@@ -5,5 +5,9 @@ function fish_prompt
printf '%s%s%s' (set_color green) (cat /etc/hostname) (set_color normal)
printf '] '
printf '%s%s' (set_color red) (pwd)
- printf '%s>: ' (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)
+ end
end