k-isabelle
5/31/2018 - 4:29 PM

bash_profile

bash_profile

## 
# For Git autocomplete
##

if [ -f ~/.git-completion.bash ]; then
  . ~/.git-completion.bash
fi

## 
# Add current git branch to command prompt
##

function parse_git_branch () {
  git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
 
RED="\[\033[0;31m\]"
YELLOW="\[\033[0;33m\]"
GREEN="\[\033[0;32m\]"
NO_COLOR="\[\033[0m\]"
 
PS1="\w$YELLOW\$(parse_git_branch)$NO_COLOR\$ "