Skip to content

Instantly share code, notes, and snippets.

@damiann
Created August 12, 2013 22:11
Show Gist options
  • Save damiann/6215805 to your computer and use it in GitHub Desktop.
Save damiann/6215805 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\]\h:\u@\W \$(parse_git_branch)$ \[\e[0m\]"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment