Friday, November 18, 2011

Color Mac OSX Terminal Like Gentoo or Other

Edit:
~/.bash_profile
or
~/.profile
 
To set Gentoo-like colors on bash prompt, edit ~/.profile (or /etc/profile for system-wide defaults) and add the following:
if [[ ${EUID} == 0 ]] ; then
       PS1='\[\033[01;31m\]\h\[\033[01;34m\] \W \$\[\033[00m\] ' 
else
      PS1='\[\033[01;32m\]\u@\h\[\033[01;34m\] \w \$\[\033[00m\] ' 
fi

and add the following two lines:
export CLICOLOR=1
 
#Dark blue
#export LSCOLORS=ExFxCxDxBxegedabagacad
 
#Gentoo Color
export LSCOLORS=ExGxFxDxCxDxDxhbhdacEc
 
#Light Blue Color
#export LSCOLORS=gxBxhxDxfxhxhxhxhxcxcx

source site here