Fix dircolors
This commit is contained in:
parent
687606c5bb
commit
15fc3cfd35
1 changed files with 3 additions and 2 deletions
5
rc
5
rc
|
|
@ -60,14 +60,15 @@ function configure_ls
|
||||||
alias ll="$1 -l $ls_options"
|
alias ll="$1 -l $ls_options"
|
||||||
alias l.="$1 -d $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
|
if [[ -e "$HOME/.dircolors/$SYS.cfg" ]]; then
|
||||||
dircolors="$HOME/.dircolors/$SYS.cfg"
|
dircolors="$HOME/.dircolors/$SYS.cfg"
|
||||||
else
|
else
|
||||||
dircolors="$HOME/.dircolors/default.cfg"
|
dircolors="$HOME/.dircolors/default.cfg"
|
||||||
fi
|
fi
|
||||||
print_info_sub -l 3 "Setting up dircolors: `basename $dircolors`"
|
print_info_sub -l 3 "Setting up dircolors: `basename $dircolors`"
|
||||||
eval `dircolors $dircolors`
|
eval `$dircolors_bin $dircolors`
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue