Created
November 30, 2012 08:07
-
-
Save parris/4174443 to your computer and use it in GitHub Desktop.
Bash_Profile, Colors on mac
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
#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