Created
June 9, 2013 14:05
-
-
Save yfuruyama/5743666 to your computer and use it in GitHub Desktop.
show git branch at bash 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
showbranch='git br 2>&1 | ruby -ne "if /\* (.*)/ =~ \$_.chomp; print \$1; end"' | |
export PS1='$('"${showbranch}"')' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment