Fix dircolors

This commit is contained in:
Eryn Wells 2013-09-09 11:12:49 -07:00
parent 687606c5bb
commit 15fc3cfd35

5
rc
View file

@ -60,14 +60,15 @@ function configure_ls
alias ll="$1 -l $ls_options"
alias l.="$1 -d $ls_options .*"
if [[ $has_gnu_ls -eq 1 ]] && binary_exists dircolors; then
local dircolors_bin=`whence -p dircolors || whence -p gdircolors`
if [[ $has_gnu_ls -eq 1 && -n "$dircolors_bin" ]]; then
if [[ -e "$HOME/.dircolors/$SYS.cfg" ]]; then
dircolors="$HOME/.dircolors/$SYS.cfg"
else
dircolors="$HOME/.dircolors/default.cfg"
fi
print_info_sub -l 3 "Setting up dircolors: `basename $dircolors`"
eval `dircolors $dircolors`
eval `$dircolors_bin $dircolors`
fi
}