Adding support for colors in Mac terminal

I was a bit disappointed at the poor support of the Terminal and iTerm for colors on a Mac system. I googled and found an article explaining how to colorize the OSX prompt.

If you want to alter you default prefix for the prompt, you can also set the PS1 variable to something more sexy.

For information here is the .bash_profile I use in order to colorize my system:

export PS1='\[\033[01;31m\]\u@\h\[\033[01;34m\] \W \$\[\033[00m\] '
export CLICOLOR=1
export LSCOLORS=ExFxCxDxBxegedabagacad
export TERM=xterm-color
alias ls='ls -G'
alias ll='ls -hl'

Leave a Reply