diff options
author | Christian Neukirchen <chneukirchen@gmail.com> | 2016-02-01 22:22:49 +0100 |
---|---|---|
committer | Christian Neukirchen <chneukirchen@gmail.com> | 2016-02-01 22:22:49 +0100 |
commit | be177ab6c880d954338aabfc8eb3d44b2d0ff2e6 (patch) | |
tree | 6579e216a2e27cae914a8d74c82faa9b7eebd72b | |
parent | acfbb485b95328b4ded71942c4ac83996e212a22 (diff) | |
download | lr-be177ab6c880d954338aabfc8eb3d44b2d0ff2e6.tar.gz lr-be177ab6c880d954338aabfc8eb3d44b2d0ff2e6.tar.xz lr-be177ab6c880d954338aabfc8eb3d44b2d0ff2e6.zip |
don't colorize when stdout is not a tty, except when -G is passed multiple times
-rw-r--r-- | lr.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lr.c b/lr.c index 61d4e38..808e741 100644 --- a/lr.c +++ b/lr.c @@ -1640,6 +1640,9 @@ main(int argc, char *argv[]) exit(2); } + if (Gflag == 1 && !isatty(1)) + Gflag = 0; + analyze_format(); if (optind == argc) { |