Created
October 20, 2011 18:55
-
-
Save domix/1301968 to your computer and use it in GitHub Desktop.
My shell PS1 for displaying the current Git branch
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="[\u@\h] \W \[\033[31m\]\`ruby -e \"print (%x{git branch 2> /dev/null}.grep(/^\*/).first || '').gsub(/^\* (.+)$/, '(\1) ')\"\`\[\033[00m\]$ " |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment