Skip to content

Instantly share code, notes, and snippets.

@spinosa
Created December 26, 2011 22:12
Show Gist options
  • Save spinosa/1522194 to your computer and use it in GitHub Desktop.
Save spinosa/1522194 to your computer and use it in GitHub Desktop.
better Git prompt
parse_git_branch() {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\ →\ \1/'
}
export PS1='\u\[\e[1;37m\]:\[\e[1;31m\]\W\[\e[1;33m\]$(parse_git_branch)\[\e[0;39m\]$ '
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment