Created
June 12, 2014 03:41
-
-
Save genghisjahn/cbc6caf4b47983510903 to your computer and use it in GitHub Desktop.
Colorful Informative Github 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
export PS1='$(git branch &>/dev/null; if [ $? -eq 0 ]; then \ | |
echo "\[\e[0;32m\][GIT: \[\e[0;31m\]$(basename `pwd`); \[\e[0;33m\]$(git branch | grep ^*|sed s/\*\ //) \ | |
$(echo `git status` | grep "nothing to commit" > /dev/null 2>&1; if [ "$?" -eq "0" ]; then \ | |
echo "\[\e[0;32m\]clean"; else \ | |
echo "\[\e[0;31m\]dirty"; fi)\[\e[0;32m\]] \$ "; else \ | |
echo "\[\e[0;31m\][\w]\[\e[m\] \$ "; fi) \[\e[0m\]' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
awesome!