I recently committed my dotfiles to a git repo, and discovered that GNU ls and BSD ls use different switches to colorize output. Using the GNU switch with BSD ls results in ls not working until you unalias it! Here's a snippet from my .bashrc that takes care of it:
# alias `ls` for color mode if ls --color=auto / >/dev/null 2>&1 then alias ls='ls --color=auto' # GNU ls else alias ls='ls -G' # BSD ls fi
Basically, if the GNU switch works, use the GNU switch; otherwise, use the BSD switch.