Skip to content

Instantly share code, notes, and snippets.

@steckel
Created April 5, 2012 23:06
Show Gist options
  • Save steckel/2314912 to your computer and use it in GitHub Desktop.
Save steckel/2314912 to your computer and use it in GitHub Desktop.
function bash_git_branch
{
git branch 2> /dev/null | grep \* | python -c "print '['+raw_input()[2:]+']'" 2> /dev/null
}
PS1='${debian_chroot:+($debian_chroot)}\W: $(bash_git_branch)\$ '
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment