Colorize OS X's BASH & VI
Quick tip for Terminal color
Here are some quick ways to add some color to BASH and VI in OS X. The below will edit the global files for all users and use just some quick color options. If you want to do this, you can probably figure out how to do this on a per-account basis and do some custom colors too. This has only been tested (so far) with Mac OS X 10.6, but it likely works with 10.5 and even 10.4.Why do this? If you've ever used virtually any Linux distribution on the planet, you'll see these options are enabled by default. I find colorized directory listings helpful. Seeing code colorized in VI is extremely helpful because you can spot simple typos quickly. I have no idea why after six generations of OS X (I don't count 10.0 as an OS, yuk!) Apple never made this default.
BASH
- Edit your /etc/bashrc file.
- Add these two lines to the end:
export CLICOLOR=1
export TERM=xterm-color - Save.
Color options are:
a blackThe directory color order is:
b red
c green
d brown
e blue
f magenta
g cyan
h light grey
A bold black, usually shows up as dark grey
B bold red
C bold green
D bold brown, usually shows up as yellow
E bold blue
F bold magenta
G bold cyan
H bold light grey; looks like bright white
x default foreground or background
- directory
- symbolic link
- socket
- pipe
- executable
- block special
- character special
- executable with setuid bit set
- executable with setgid bit set
- directory writable to others, with sticky bit
- directory writable to others, without sticky bit
- Edit your /usr/share/vim/vimrc file.
- Add these two lines to the end:
:set term=builtin_xterm
:syntax on - Save
Nicole:
Frances:











