Skip to content

Instantly share code, notes, and snippets.

@attaboy
Created November 8, 2011 18:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save attaboy/1348653 to your computer and use it in GitHub Desktop.
Save attaboy/1348653 to your computer and use it in GitHub Desktop.
Colored bash prompt for those with git completion tools installed
if [ "$USER" = "root" ]; then
PS1='\e[1;31m[\u@\h \W$(__git_ps1 " (%s)")]\$\e[0m '
else
PS1='\[\e[0;34m\][\[\e[m\]\u@\h \[\e[0;33m\]\w\[\e[0;36m\]$(__git_ps1 " (%s)")\[\e[0;34m\]]\[\e[0m\]\$ '
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment