Skip to content

Instantly share code, notes, and snippets.

@lylo
Created May 3, 2010 13:49
Show Gist options
  • Save lylo/388113 to your computer and use it in GitHub Desktop.
Save lylo/388113 to your computer and use it in GitHub Desktop.
source /opt/local/share/doc/git-core/contrib/completion/git-completion.bash
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
export PS1="\h:\w\$(parse_git_branch)$ "
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment