]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
rename: make --no-act to imply --verbose
authorSami Kerola <kerolasa@iki.fi>
Thu, 18 May 2017 21:19:34 +0000 (22:19 +0100)
committerKarel Zak <kzak@redhat.com>
Fri, 19 May 2017 09:43:34 +0000 (11:43 +0200)
It is reasonable to assume use of --no-act means one wants to always see
what would have happen if rename is done.  To say same slightly differently,
if there is sn use case for silent rename --no-act run I cannot think one.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
misc-utils/rename.c

index c1b9d4a0eb715efd7cf6713ba517cd7e36cf65dd..502e888d797eb45d05c61c655c1d5a96929b002d 100644 (file)
@@ -154,11 +154,11 @@ int main(int argc, char **argv)
 
        while ((c = getopt_long(argc, argv, "vsVhn", longopts, NULL)) != -1)
                switch (c) {
-               case 'v':
-                       verbose = 1;
-                       break;
                case 'n':
                        noact = 1;
+                       /* fallthrough */
+               case 'v':
+                       verbose = 1;
                        break;
                case 's':
                        do_rename = do_symlink;