Permalink
Browse files

Added a git label when running :sh before the prompt.

  • Loading branch information...
1 parent 684ca29 commit c307c27c6ec43785adb8de25de8e9649459c5f34 @sedrik committed Aug 18, 2011
Showing with 10 additions and 1 deletion.
  1. +10 −1 ps1_functions
View
@@ -35,6 +35,15 @@ printf " \033[32m\\\u\033[0m@\033[36m\\h\033[35m:\w\033[0m "
fi
}
+ps1_vim()
+{
+ VIM_PS1=""
+ if [ $VIM ]; then
+ VIM_PS1="[VIM] "
+ fi
+ printf "$VIM_PS1"
+}
+
ps1_git()
{
local branch="" sha1="" line="" attr="" color=0
@@ -109,7 +118,7 @@ case "$token" in
esac
done
-PS1="\D{%H:%M:%S}$(ps1_identity)\$(ps1_git)${separator}${prompt_char} "
+PS1="\D{%H:%M:%S}$(ps1_identity)\$(ps1_git)${separator}$(ps1_vim)${prompt_char} "
}
ps2_set()

0 comments on commit c307c27

Please sign in to comment.