Skip to content

Instantly share code, notes, and snippets.

@yzguy
Created October 25, 2014 04:19
Show Gist options
  • Save yzguy/6a5554e874d201f47b89 to your computer and use it in GitHub Desktop.
Save yzguy/6a5554e874d201f47b89 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[0;95m[\] \u\[\e[0;97m\]@\[\e[0;92m\]\h: $(parse_git_branch) \[\e[0;97m\]\W \[\e[0;95m\]] $\[\e[0m\] '
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment