Skip to content

Instantly share code, notes, and snippets.

@julianalucena
Created January 4, 2012 17:51
Show Gist options
  • Save julianalucena/1561184 to your computer and use it in GitHub Desktop.
Save julianalucena/1561184 to your computer and use it in GitHub Desktop.
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
export PS1="\[\033[38m\]\u@\h\[\033[01;34m\] \W \[\033[31m\]\$(parse_git_branch)\[\033[37m\]$\[\033[00m\] "
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment