tstellar / rpms / coreutils

Forked from rpms/coreutils 4 years ago
Clone
0933009
# color-ls initialization
0933009
alias ll 'ls -l'
0933009
alias l. 'ls -d .*'
0933009
0933009
set COLORS=/etc/DIR_COLORS
0933009
if ($?TERM) then
0933009
    if ( -e "/etc/DIR_COLORS.$TERM" ) set COLORS="/etc/DIR_COLORS.$TERM"
0933009
endif
0933009
if ( -f ~/.dircolors ) set COLORS=~/.dircolors
0933009
if ($?TERM) then
0933009
    if ( -f ~/.dircolors."$TERM" ) set COLORS=~/.dircolors."$TERM"
0933009
endif
0933009
if ( -f ~/.dir_colors ) set COLORS=~/.dir_colors
0933009
if ($?TERM) then
0933009
    if ( -f ~/.dir_colors."$TERM" ) set COLORS=~/.dir_colors."$TERM"
0933009
endif
0933009
0933009
if ( ! -e "$COLORS" ) exit
0933009
0933009
eval `dircolors -c $COLORS`
0933009
0933009
if ( "$LS_COLORS" == '' ) then
0933009
   exit
0933009
endif
0933009
0933009
set color_none=`sed -n '/^COLOR.*none/Ip' < $COLORS`
0933009
if ( "$color_none" == '' ) then
0933009
alias ll 'ls -l --color=tty'
0933009
alias l. 'ls -d .* --color=tty'
0933009
alias ls 'ls --color=tty'
0933009
endif
0933009
unset color_none