Skip to content

Instantly share code, notes, and snippets.

@lorn
Created May 23, 2011 19:08
Show Gist options
  • Save lorn/987314 to your computer and use it in GitHub Desktop.
Save lorn/987314 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="\n\u @ \[\e[1;44m\]\h\[\e[0m\] \e[0;31m]\$(parse_git_branch)[\e[0m\] \t\n[\[\e[1;44m\]\w\[\e[0m\]]: "
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment