diff options
author | Jim Meyering <jim@meyering.net> | 1996-06-01 23:08:35 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1996-06-01 23:08:35 +0000 |
commit | f51eb4a5cc9bb7ea2a9906fb4bc24faff0449b5e (patch) | |
tree | a59d6635ee50abe2031a1fb2e20e9b08d8d777ff /src | |
parent | de40301f0ad8727ace1f0a1a28b851567f565a00 (diff) | |
download | coreutils-f51eb4a5cc9bb7ea2a9906fb4bc24faff0449b5e.tar.xz |
(decode_switches): Set print_with_color in one statement.
Diffstat (limited to 'src')
-rw-r--r-- | src/ls.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -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) { |