Skip to content

Instantly share code, notes, and snippets.

@ihower
Created December 28, 2010 09:58
Show Gist options
  • Save ihower/757102 to your computer and use it in GitHub Desktop.
Save ihower/757102 to your computer and use it in GitHub Desktop.
function parse_git_branch {
ref=$(git symbolic-ref HEAD 2> /dev/null) || return;
echo "("${ref#refs/heads/}") ";
}
PS1="[\[\033[1;32m\]\w\[\033[0m] \[\033[0m\]\[\033[1;36m\]\$(parse_git_branch)\[\033[0m\]$ "
if [[ -s /Users/ihower/.rvm/scripts/rvm ]] ; then source /Users/ihower/.rvm/scripts/rvm ; fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment