Created
March 18, 2012 05:36
-
-
Save codian/2069206 to your computer and use it in GitHub Desktop.
current git branch name on prompt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export PS1="\[\033[34m\]\w\[\033[35m\]\`ruby -e \"print (%x{git branch 2> /dev/null}.split(/\n/).grep(/^\*/).first || '').gsub(/^\* (.+)$/, '(\1)')\"\`\[\033[00m\]> " |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment