Skip to content

Instantly share code, notes, and snippets.

@vkurchatkin
Created November 21, 2014 11:21
Show Gist options
  • Save vkurchatkin/e157ab80109a1573fc17 to your computer and use it in GitHub Desktop.
Save vkurchatkin/e157ab80109a1573fc17 to your computer and use it in GitHub Desktop.
MAGENTA="\[\033[0;35m\]"
YELLOW="\[\033[0;33m\]"
BLUE="\[\033[34m\]"
LIGHT_GRAY="\[\033[0;37m\]"
CYAN="\[\033[0;36m\]"
GREEN="\[\033[0;32m\]"
NORMAL="\[\033[0;0m\]"
GIT_PS1_SHOWDIRTYSTATE=true
export LS_OPTIONS='--color=auto'
export CLICOLOR='Yes'
export LSCOLORS=gxfxbEaEBxxEhEhBaDaCaD
export PS1="\u@\h"'$(
if [[ $(__git_ps1) =~ \*\)$ ]]
# a file has been modified but not added
then echo "'$YELLOW'"$(__git_ps1 " (%s)")
elif [[ $(__git_ps1) =~ \+\)$ ]]
# a file has been added, but not commited
then echo "'$MAGENTA'"$(__git_ps1 " (%s)")
# the state is clean, changes are commited
else echo "'$CYAN'"$(__git_ps1 " (%s)")
fi)'$NORMAL" \W:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment