Skip to content

Instantly share code, notes, and snippets.

@phatduckk
Created August 14, 2009 02:15
Show Gist options
  • Save phatduckk/167601 to your computer and use it in GitHub Desktop.
Save phatduckk/167601 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[36;1m\]\u@\[\e[32;1m\]\H\e[0m:\[\e[0m\]\e[35;1m\w\e[33;1m\]$(parse_git_branch)\e[0m > \[\e[0m\]"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment