Skip to content

Instantly share code, notes, and snippets.

@parris
Created November 30, 2012 08:07
Show Gist options
  • Save parris/4174443 to your computer and use it in GitHub Desktop.
Save parris/4174443 to your computer and use it in GitHub Desktop.
Bash_Profile, Colors on mac
#make sure to run: git config --global color.ui true
function parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\*\1/'
}
case "$TERM" in
xterm-*color) color_prompt=yes;;
esac
if [ "$color_prompt" = yes ]; then
PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[0;33m\]$(parse_git_branch)\[\033[00m\]\$ '
else
PS1='\u@\h:\w$(parse_git_branch)\$ '
fi
export CLICOLOR=1
export LSCOLORS=ExFxCxDxBxegedabagacad
alias ls='ls -G'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment