Fix ls setup in rc
This commit is contained in:
parent
c4216c9332
commit
fd5ced8e5a
1 changed files with 7 additions and 7 deletions
14
rc
14
rc
|
@ -50,13 +50,13 @@ esac
|
||||||
|
|
||||||
function {
|
function {
|
||||||
local has_gnu_ls=1
|
local has_gnu_ls=1
|
||||||
local ls='ls'
|
local lsbin='ls'
|
||||||
local ls_options='--color=auto'
|
local ls_options='--color=auto'
|
||||||
|
|
||||||
case $SYS in
|
case $SYS in
|
||||||
darwin)
|
darwin)
|
||||||
if binary_exists gls; then
|
if binary_exists gls; then
|
||||||
ls='gls'
|
lsbin='gls'
|
||||||
else
|
else
|
||||||
has_gnu_ls=0
|
has_gnu_ls=0
|
||||||
ls_options='-G'
|
ls_options='-G'
|
||||||
|
@ -69,11 +69,11 @@ function {
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
print_info_sub -l 3 "Setting up ls: `which $ls`"
|
print_info_sub -l 3 "Setting up ls: `which $lsbin`"
|
||||||
alias ls="$ls $ls_options"
|
alias ls="$lsbin $ls_options"
|
||||||
alias la="$ls -A $ls_options"
|
alias la="$lsbin -A $ls_options"
|
||||||
alias ll="$ls -l $ls_options"
|
alias ll="$lsbin -l $ls_options"
|
||||||
alias l.="$ls -d $ls_options .*"
|
alias l.="$lsbin -d $ls_options .*"
|
||||||
|
|
||||||
if [ $has_gnu_ls ]; then
|
if [ $has_gnu_ls ]; then
|
||||||
if [ -e $HOME/.dircolors/$SYS.cfg ]; then
|
if [ -e $HOME/.dircolors/$SYS.cfg ]; then
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue