This seems to be better fix ;) for noninteractive mode

This commit is contained in:
Ondřej Vašík 2012-04-17 15:02:56 +02:00
parent 6972fb24fa
commit 9a7f541e9b
1 changed files with 4 additions and 4 deletions

View File

@ -14,10 +14,10 @@ if ($?TERM) then
if ( -e "/etc/DIR_COLORS.$TERM" ) then
set COLORS="/etc/DIR_COLORS.$TERM"
endif
endif
if ( -e "/etc/DIR_COLORS.256color" ) then
if ( "`tty -s` && tput colors" == "256" ) then
set COLORS=/etc/DIR_COLORS.256color
if ( -e "/etc/DIR_COLORS.256color" ) then
if ( "`tput colors`" == "256" ) then
set COLORS=/etc/DIR_COLORS.256color
endif
endif
endif
if ( -f ~/.dircolors ) set COLORS=~/.dircolors