Skip to content

Instantly share code, notes, and snippets.

@yzguy
Last active October 25, 2015 02:15
Show Gist options
  • Save yzguy/d0ce4e95daca56b8e975 to your computer and use it in GitHub Desktop.
Save yzguy/d0ce4e95daca56b8e975 to your computer and use it in GitHub Desktop.
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
export PS1='\[\e[33;34m\]\u\[\e[0;97m\]@\[\e[33;32m\]\h\[\e[33;31m\]$(parse_git_branch)\[\e[0m\] \[\e[0;97m\]\W \[\e[33;40m\]->\[\e[0m\] '
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment