Created
March 11, 2014 18:44
-
-
Save jdtoy/9492324 to your computer and use it in GitHub Desktop.
Pretty Gitting.
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
source /usr/local/git/contrib/completion/git-completion.bash | |
source /usr/local/git/contrib/completion/git-prompt.sh | |
export GIT_PS1_SHOWDIRTYSTATE=True | |
export PATH=/opt/local/bin:/opt/local/sbin:$PATH | |
export PATH=${PATH}:$HOME/gsutil | |
MAGENTA="\[\033[0;35m\]" | |
YELLOW="\[\033[0;33m\]" | |
BLUE="\[\033[34m\]" | |
LIGHT_GRAY="\[\033[0;37m\]" | |
DARK_GRAY="\[\033[30m\]" | |
CYAN="\[\033[0;36m\]" | |
GREEN="\[\033[0;32m\]" | |
GIT_PS1_SHOWDIRTYSTATE=true | |
export LS_OPTIONS='--color=auto' | |
export CLICOLOR='Yes' | |
export LSCOLORS=gxfxbEaEBxxEhEhBaDaCaD | |
export PS1=$DARK_GRAY"\u@\h"$BLUE" \w"'$( | |
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)'"\n"$GREEN"\$ " | |
# alias ll='ls -lah' | |
# alias gg='git status -s' | |
# export PS1='\u@\h: \W$(__git_ps1 " (%s)")\n\$ ' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment