summaryrefslogtreecommitdiff
path: root/functions
diff options
context:
space:
mode:
authorNathan Lasseter <nathan@4574.co.uk>2012-12-12 21:29:52 +0000
committerNathan Lasseter <nathan@4574.co.uk>2012-12-12 21:29:52 +0000
commitdcfd4df060a3286cd563a67ac0384c703285d700 (patch)
tree680788710606ff03305f5e107a966489b6944fbc /functions
parent6618b5e95434cd78451add3567db303a545977af (diff)
New Prompt!
Diffstat (limited to 'functions')
-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