1
0
Fork 0

Adds dircolors support for OS X

All GNU coreutils commands are installed with the prefix 'g' on Mac OS
X via homebrew. This fix adds support for GNU ls without losing the git
alias 'gls'.
pull/81/head
Steve McKinney 13 years ago
parent 6d38d9836b
commit 8dc4c32c91

@ -20,6 +20,18 @@ if (( $+commands[dircolors] )); then
else
alias ls="$aliases[ls] -F"
fi
elif (( $+commands[gdircolors] )); then
# GNU core utilities on OS X.
alias ls='/usr/local/bin/gls --group-directories-first'
if zstyle -t ':omz:alias:ls' color; then
if [[ -f "$HOME/.dir_colors" ]]; then
eval $(gdircolors "$HOME/.dir_colors")
fi
alias ls="$aliases[ls] --color=auto"
else
alias ls="$aliases[ls] -F"
fi
else
# BSD core utilities.
if zstyle -t ':omz:alias:ls' color; then

Loading…
Cancel
Save