]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
basename: mention that the -s option implies -a in usage
authorBernhard Voelker <mail@bernhard-voelker.de>
Tue, 25 Mar 2014 22:41:45 +0000 (23:41 +0100)
committerBernhard Voelker <mail@bernhard-voelker.de>
Wed, 26 Mar 2014 10:26:58 +0000 (11:26 +0100)
* src/basename.c (usage): Mention that -s implies -a.
(main): Add "fall through" comment to case 's'.

Spotted by coverity: MISSING_BREAK.

src/basename.c

index c34ec6cb2373335ed40cdd65c41292098bd28032..05c5c775050f696ec3cb8dba796c03b6b13844af 100644 (file)
@@ -59,7 +59,7 @@ If specified, also remove a trailing SUFFIX.\n\
 
       fputs (_("\
   -a, --multiple       support multiple arguments and treat each as a NAME\n\
-  -s, --suffix=SUFFIX  remove a trailing SUFFIX\n\
+  -s, --suffix=SUFFIX  remove a trailing SUFFIX; implies -a\n\
   -z, --zero           separate output with NUL rather than newline\n\
 "), stdout);
       fputs (HELP_OPTION_DESCRIPTION, stdout);
@@ -146,6 +146,7 @@ main (int argc, char **argv)
         {
         case 's':
           suffix = optarg;
+          /* Fall through: -s implies -a.  */
 
         case 'a':
           multiple_names = true;