Skip to content

Instantly share code, notes, and snippets.

@richmidwinter
Created March 19, 2014 07:02
Show Gist options
  • Save richmidwinter/9636763 to your computer and use it in GitHub Desktop.
Save richmidwinter/9636763 to your computer and use it in GitHub Desktop.
GIT_COMPLETION_PATH="/usr/local/etc/bash_completion.d/git-completion.bash"
GIT_PROMPT_PATH="/usr/local/etc/bash_completion.d/git-prompt.sh"
if [ -f "$GIT_COMPLETION_PATH" ]; then
GIT_PS1_SHOWDIRTYSTATE=true
. "$GIT_COMPLETION_PATH"
. "$GIT_PROMPT_PATH"
ADD_PS1='$(__git_ps1)'
fi
if [[ ${EUID} == 0 ]] ; then
PS1="\[\033[01;31m\]\h\[\033[01;34m\] \W\[\033[33m\]$ADD_PS1\[\033[34m\] \$\[\033[00m\] "
else
PS1="\[\033[01;32m\]\u@\h\[\033[01;34m\] \W\[\033[33m\]$ADD_PS1\[\033[34m\] \$\[\033[00m\] "
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment