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