Skip to content

Instantly share code, notes, and snippets.

@EgonSpengler
Created March 14, 2016 17:18
Show Gist options
  • Save EgonSpengler/2f73fdab34125e1dfe5a to your computer and use it in GitHub Desktop.
Save EgonSpengler/2f73fdab34125e1dfe5a to your computer and use it in GitHub Desktop.
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
@EgonSpengler
Copy link
Author

(addition to the top of my git-prompt.sh for PROMPT_COMMAND)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment