Skip to content

Instantly share code, notes, and snippets.

@hoolymama
Created November 24, 2009 11:51
Show Gist options
  • Save hoolymama/241816 to your computer and use it in GitHub Desktop.
Save hoolymama/241816 to your computer and use it in GitHub Desktop.
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
PS1="\[\033[1;33m\]\u@\h:\w $(parse_git_branch)>\[\033[0m\] "
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment