From: Jim Meyering Date: Sat, 1 Jun 1996 23:08:35 +0000 (+0000) Subject: (decode_switches): Set print_with_color in one statement. X-Git-Tag: TEXTUTILS-1_18~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f51eb4a5cc9bb7ea2a9906fb4bc24faff0449b5e;p=thirdparty%2Fcoreutils.git (decode_switches): Set print_with_color in one statement. --- diff --git a/src/ls.c b/src/ls.c index 2d54c3fb0c..180ca8ba49 100644 --- a/src/ls.c +++ b/src/ls.c @@ -1070,10 +1070,9 @@ decode_switches (int argc, char **argv) i = color_always; } - if (i == color_if_tty) - print_with_color = isatty (STDOUT_FILENO); - else - print_with_color = (i == color_always); + print_with_color = (i == color_always + || (i == color_if_tty + && isatty (STDOUT_FILENO))); if (print_with_color) {