1) Install package management tool "Homebrew" for MAC
http://brew.sh/
2) Configure the Terminal's background/foreground and text colors.
- Default Foreground: 255/255/255
- Default Background: 51/51/51
- ANSI Black: 77/77/77
- ANSI Green: 152/251/152
- ANSI Yellow: 240/230/140
- ANSI Blue: 205/133/63
- ANSI Blue Bold 135/206/235
- ANSI Magenta: 255/222/173 or 205/92/92
- ANSI Cyan: 255/160/160
- ANSI Cyan Bold: 255/215/0
- ANSI White: 245/222/179
export PS1="\[\e[0;31m\]\u@\h\[\e[0;33m\]:\[\e[1;34m\]\w\[\e[1;37m\]$\[\e[m\]"
4) Configure the Terminal to execute .bashrc when startup.Terminal -> Preferences -> Select the current profile -> Shell -> Run command (check the box of "Run inside shell")
5) Enhance the color of "ls" command
a) brew install xz coreutils
b) gdircolors --print-database >> ~/.dir_colors
c) add the following code to ~/.bashrc
if brew list |grep coreutils > /dev/null ;then
PATH="$(brew --prefix coreutils)/libexec/gnubin:$PATH"
aliasls='ls -F --show-control-chars --color=auto'
eval`gdircolors -b $HOME/.dir_colors`
fi
References:
http://www.darkrune.org/blog/?p=213