about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--lr.c3
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) {