Skip to content

Instantly share code, notes, and snippets.

@ikr
Created March 12, 2011 00:42
Show Gist options
  • Save ikr/866870 to your computer and use it in GitHub Desktop.
Save ikr/866870 to your computer and use it in GitHub Desktop.
git branch in command prompt
export PS1="\[\033[38m\]\u@\h\[\033[01;34m\] \W \[\033[31m\]\`ruby -e \"print (%x{git branch 2> /dev/null}.grep(/^\*/).first || '').gsub(/^\* (.+)$/, '(\1) ')\"\`\[\033[00m\]$\[\033[00m\] "
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment