f180de
# skip everything for non-interactive shells
f180de
if (! $?prompt) exit
f180de
f180de
# color-ls initialization
f180de
if ( $?USER_LS_COLORS ) then
f180de
  if ( "$USER_LS_COLORS" != "" ) then
f180de
     #when USER_LS_COLORS defined do not override user
f180de
     #specified LS_COLORS and use them
f180de
     goto finish
f180de
  endif
f180de
endif
f180de
f180de
alias ll 'ls -l'
f180de
alias l. 'ls -d .*'
f180de
set COLORS=/etc/DIR_COLORS
f180de
f180de
if ($?TERM) then
f180de
  if ( -e "/etc/DIR_COLORS.256color" ) then
f180de
    if ( "`/usr/bin/tput colors`" == "256" ) then
f180de
       set COLORS=/etc/DIR_COLORS.256color
f180de
    endif
f180de
  endif
f180de
  if ( -e "/etc/DIR_COLORS.$TERM" ) then
f180de
     set COLORS="/etc/DIR_COLORS.$TERM"
f180de
  endif
f180de
endif
f180de
if ( -f ~/.dircolors ) set COLORS=~/.dircolors
f180de
if ( -f ~/.dir_colors ) set COLORS=~/.dir_colors
f180de
if ($?TERM) then
f180de
  if ( -f ~/.dircolors."$TERM" ) set COLORS=~/.dircolors."$TERM"
f180de
  if ( -f ~/.dir_colors."$TERM" ) set COLORS=~/.dir_colors."$TERM"
f180de
endif
f180de
set INCLUDE="`/usr/bin/cat "$COLORS" | /usr/bin/grep '^INCLUDE' | /usr/bin/cut -d ' ' -f2-`"
f180de
f180de
if ( ! -e "$COLORS" ) exit
f180de
f180de
set _tmp="`/usr/bin/mktemp .colorlsXXX -q --tmpdir=/tmp`"
f180de
#if mktemp fails, exit when include was active, otherwise use $COLORS file
f180de
if ( "$_tmp" == '' ) then
f180de
  if ( "$INCLUDE" == '' ) then
f180de
    eval "`/usr/bin/dircolors -c $COLORS`"
f180de
  endif
f180de
  goto cleanup
f180de
endif
f180de
f180de
if ( "$INCLUDE" != '' ) /usr/bin/cat "$INCLUDE" >> $_tmp
f180de
/usr/bin/grep -v '^INCLUDE' "$COLORS" >> $_tmp
f180de
f180de
eval "`/usr/bin/dircolors -c $_tmp`"
f180de
f180de
/usr/bin/rm -f $_tmp
f180de
f180de
if ( "$LS_COLORS" == '' ) exit
f180de
cleanup:
f180de
set color_none=`/usr/bin/sed -n '/^COLOR.*none/Ip' < $COLORS`
f180de
if ( "$color_none" != '' ) then
f180de
   unset color_none
f180de
   exit
f180de
endif
f180de
unset color_none
f180de
unset _tmp
f180de
unset INCLUDE
f180de
unset COLORS
f180de
f180de
finish:
f180de
alias ll 'ls -l --color=auto'
f180de
alias l. 'ls -d .* --color=auto'
f180de
alias ls 'ls --color=auto'