Skip to content

Instantly share code, notes, and snippets.

@robmerrell
Created August 4, 2010 16:47
Show Gist options
  • Save robmerrell/508422 to your computer and use it in GitHub Desktop.
Save robmerrell/508422 to your computer and use it in GitHub Desktop.
function parse_git_branch {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
RED="\[\033[0;31m\]"
GREEN="\[\033[0;32m\]"
WHITE="\[\033[0;37m\]"
CYAN="\[\033[0;36m\]"
PS1="$RED\$(date +%H:%M) \w$GREEN \$(parse_git_branch)$CYAN[\$(~/.rvm/bin/rvm-prompt i v g)]$WHITE\$ "
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment