summaryrefslogtreecommitdiff
path: root/functions/fish_prompt.fish
diff options
context:
space:
mode:
authorNathan Lasseter <nathan.je.lasseter@googlemail.com>2011-04-03 23:30:24 +0100
committerNathan Lasseter <nathan.je.lasseter@googlemail.com>2011-04-03 23:30:24 +0100
commitdbf09a6f2cc016c1d571ec337acd11e517094456 (patch)
treee1cca39d303a300a0f09707460af4c130982290a /functions/fish_prompt.fish
First Commit
Diffstat (limited to 'functions/fish_prompt.fish')
-rw-r--r--functions/fish_prompt.fish9
1 files changed, 9 insertions, 0 deletions
diff --git a/functions/fish_prompt.fish b/functions/fish_prompt.fish
new file mode 100644
index 0000000..ad34183
--- /dev/null
+++ b/functions/fish_prompt.fish
@@ -0,0 +1,9 @@
+function fish_prompt
+ set cmdcount (math $cmdcount+1)
+ printf '[%d] ' $cmdcount
+ if test -d .git
+ printf '%s%s %s(%s)%s>: ' (set_color red) (pwd) (set_color blue) (git branch | grep "*" | awk -F" " '{print $2}') (set_color normal)
+ else
+ printf '%s%s%s>: ' (set_color red) (pwd) (set_color normal)
+ end
+end