Skip to content

Instantly share code, notes, and snippets.

@spetschu
Created June 5, 2010 21:43
Show Gist options
  • Save spetschu/427027 to your computer and use it in GitHub Desktop.
Save spetschu/427027 to your computer and use it in GitHub Desktop.
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
export PS1="\t:\w\$(parse_git_branch)>"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment