Skip to content

Instantly share code, notes, and snippets.

@knzai
Created March 6, 2010 22:39
Show Gist options
  • Save knzai/323990 to your computer and use it in GitHub Desktop.
Save knzai/323990 to your computer and use it in GitHub Desktop.
#Just be careful. Safest to properly end color sequence, so instead of this
#export PS1="\[\033[01;32m\]\u\[\033[00m\]\[\033[01;31m\]\$(git_br)\[\033[01;32m\]\[\033[00m\]:\[\033[01;36m\]\$(git_pwd)\[\033[00m\]\$ "
#do this
USER_GREEN='\[\e[01;32m\]'
#NO_COLOR='\[\e[00m\]'
REPO_RED='\[\e[01;31m\]'
PATH_BLUE='\[\e[01;36m\]'
END_COLOR='\[\e[m\]'
PS1="${USER_GREEN}\u${END_COLOR}${REPO_RED}\$(git_br)${END_COLOR}:${PATH_BLUE}\$(git_pwd)${END_COLOR}$ "
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment