Last active
October 19, 2016 15:33
-
-
Save rrafal/440839dca86afa99c33ed1b8a72604a0 to your computer and use it in GitHub Desktop.
Git branch in prompt in Linux
This file contains hidden or 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
GREEN='\e[32m' | |
DEFAULT='\e[39m' | |
PS1="\u@\h:\w$GREEN\$(git branch 2>/dev/null | grep '^*' | colrm 1 1)$DEFAULT\$ " |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment