Skip to content

Instantly share code, notes, and snippets.

@herval
Created March 15, 2012 13:13
Show Gist options
  • Save herval/2044137 to your computer and use it in GitHub Desktop.
Save herval/2044137 to your computer and use it in GitHub Desktop.
My .bash_profile prompt
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
# <rvm_ruby@gemset> (<git branch, if in a git folder>) @ <current path in disk>
PS1='\[\e[0;32m\]$(~/.rvm/bin/rvm-prompt i v g) $(parse_git_branch)\[\e[m\] @ \[\e[1;34m\]\w\[\e[m\] \[\e[m\]
\[\e[1;32m\]\$ \[\e[m\]\[\e[m\] '
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment