Skip to content

Instantly share code, notes, and snippets.

@numberwhun
Forked from jtmkrueger/promptcolor
Created March 12, 2012 10:01
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 numberwhun/2020998 to your computer and use it in GitHub Desktop.
Save numberwhun/2020998 to your computer and use it in GitHub Desktop.
color your prompt and show git branch
#color and git branch
parse_git_branch() {··
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
export CLICOLOR=1
export GREP_OPTIONS="--color"
export LSCOLORS=gxfxcxdxbxegedabagacad
PS1='\n\[\e[1;36m\]\w \[\e[m\]\[\e[1;33m\]$(parse_git_branch)\[\e[m\] \n> '
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment