added missing include for git prompt

This commit is contained in:
Steffen Vogel 2014-05-21 13:39:58 +02:00
parent 7cbd4c79b1
commit a95dd3ec87

View file

@ -31,6 +31,11 @@ if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
debian_chroot=$(cat /etc/debian_chroot)
fi
# defines __git_ps1
if [ -f ~/.bash_env ]; then
source ~/.bash_git
fi
# command prompt
if [[ $EUID -ne 0 ]]; then
PS1='\[\e[01;30m\]\A `if [ $? = 0 ]; then echo "\[\e[32m\]✔"; else echo "\[\e[31m\]✘"; fi` \[\e[01;34m\]\u\[\e[01;33m\]@\[\e[01;36m\]\h `[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "\[\e[31m\]" || echo "\[\e[32m\]"`$(__git_ps1 "(%s)\[\e[00m\]")\[\e[01;34m\]\w\[\e[00m\]\$ '