Hi,

I noticed that with gzip when using both the -v and -k options, the
associated wording doesn't correctly reflect the action of the -k (keep)
option.

I've attached a trivial patch (against gzip 1.6) to correctly
distinguish between having this option set or not.

Thanks
diff -ru gzip-1.6/gzip.c gzip-1.6.new/gzip.c
--- gzip-1.6/gzip.c	2013-05-28 09:25:19.000000000 -0400
+++ gzip-1.6.new/gzip.c	2014-01-08 12:20:04.443394993 -0500
@@ -899,7 +899,11 @@
             display_ratio(bytes_in-(bytes_out-header_bytes), bytes_in, stderr);
         }
         if (!test && !to_stdout) {
-            fprintf(stderr, " -- replaced with %s", ofname);
+            if (!keep) {
+                fprintf(stderr, " -- replaced with %s", ofname);
+            } else {
+                fprintf(stderr, " -- created %s", ofname);
+            }
         }
         fprintf(stderr, "\n");
     }

Reply via email to