From 9a7f541e9b6eaa223be4b063d0a875d0c678ce08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Va=C5=A1=C3=ADk?= Date: Tue, 17 Apr 2012 15:02:56 +0200 Subject: [PATCH] This seems to be better fix ;) for noninteractive mode --- coreutils-colorls.csh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/coreutils-colorls.csh b/coreutils-colorls.csh index 0c1b2e3..e244afb 100755 --- a/coreutils-colorls.csh +++ b/coreutils-colorls.csh @@ -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