Skip to content

Instantly share code, notes, and snippets.

@hampelm
Last active December 12, 2015 01:08
Show Gist options
  • Save hampelm/4688427 to your computer and use it in GitHub Desktop.
Save hampelm/4688427 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="\[\e[32;0m\]\$(parse_git_branch)\W$ \[\e[0m\]"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment