Skip to content

Instantly share code, notes, and snippets.

@tiagogodinho
Created December 16, 2013 17:27
Show Gist options
  • Select an option

  • Save tiagogodinho/7990833 to your computer and use it in GitHub Desktop.

Select an option

Save tiagogodinho/7990833 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\]"
YELLOW="\[\033[0;33m\]"
GREEN="\[\033[0;32m\]"
NO_COLOUR="\[\033[0m\]"
PS1="\w$RED\$(parse_git_branch)$NO_COLOUR \$ "
PATH=/usr/local/bin:/Users/tiago/.rvm/gems/ruby-2.0.0-p247/bin:/Users/tiago/.rvm/gems/ruby-2.0.0-p247@global/bin:/Users/tiago/.rvm/rubies/ruby-2.0.0-p247/bin:/Users/tiago/.rvm/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment