Skip to content

Instantly share code, notes, and snippets.

@tippenein
Created February 14, 2013 17:52
Show Gist options
  • Save tippenein/4954657 to your computer and use it in GitHub Desktop.
Save tippenein/4954657 to your computer and use it in GitHub Desktop.
parse_git_branch () {
git branch 2> /dev/null | grep '*' | sed 's#*\ \(.*\)#(git::\1)#'
}
export PS1="$PS1\$(parse_git_branch) "
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment