Tizen 2.0 Release
[external/tizen-coreutils.git] / packaging / coreutils-colorls.csh
1 # color-ls initialization
2 alias ll 'ls -l'
3 alias l. 'ls -d .*'
4
5 set COLORS=/etc/DIR_COLORS
6 if ($?TERM) then
7     if ( -e "/etc/DIR_COLORS.$TERM" ) set COLORS="/etc/DIR_COLORS.$TERM"
8 endif
9 if ( -f ~/.dircolors ) set COLORS=~/.dircolors
10 if ($?TERM) then
11     if ( -f ~/.dircolors."$TERM" ) set COLORS=~/.dircolors."$TERM"
12 endif
13 if ( -f ~/.dir_colors ) set COLORS=~/.dir_colors
14 if ($?TERM) then
15     if ( -f ~/.dir_colors."$TERM" ) set COLORS=~/.dir_colors."$TERM"
16 endif
17
18 if ( ! -e "$COLORS" ) exit
19
20 eval `dircolors -c $COLORS`
21
22 if ( "$LS_COLORS" == '' ) then
23    exit
24 endif
25
26 set color_none=`sed -n '/^COLOR.*none/Ip' < $COLORS`
27 if ( "$color_none" == '' ) then
28 alias ll 'ls -l --color=tty'
29 alias l. 'ls -d .* --color=tty'
30 alias ls 'ls --color=tty'
31 endif
32 unset color_none