Skip to content

Instantly share code, notes, and snippets.

@eribeiro
Created August 9, 2012 17:56
Show Gist options
  • Save eribeiro/3306536 to your computer and use it in GitHub Desktop.
Save eribeiro/3306536 to your computer and use it in GitHub Desktop.
Color Git
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ \[\1\]/'
}
PS1='\[\033[01;37m\]\w\[\033[00;35m\]$(parse_git_branch)\[\033[00m\] \$ '
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment