Created
March 14, 2016 17:18
-
-
Save EgonSpengler/2f73fdab34125e1dfe5a to your computer and use it in GitHub Desktop.
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
red='\[\e[0;31m\]' | |
green='\[\e[0;32m\]' | |
yellow='\[\e[0;33m\]' | |
blue='\[\e[0;34m\]' | |
magenta='\[\e[1;35m\]' | |
cyan='\[\e[0;36m\]' | |
white='\[\e[0;m\]' | |
if [ `id -u` -eq "0" ]; then | |
root=${red} | |
else | |
root=${green} | |
fi | |
export PROMPT_COMMAND="__git_ps1 '${white}┌─[${root}\u${white}@${yellow}\h${white}][${red}\w${white}]' '\n${white}└──╼ '" | |
GIT_PS1_SHOWDIRTYSTATE=1 | |
GIT_PS1_SHOWSTASHSTATE=1 | |
GIT_PS1_SHOWUPSTREAM=1 | |
GIT_PS1_SHOWCOLORHINTS=true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
(addition to the top of my git-prompt.sh for PROMPT_COMMAND)