(main): When there are too many non-option arguments,
authorJim Meyering <jim@meyering.net>
Thu, 16 Aug 2001 05:47:48 +0000 (05:47 +0000)
committerJim Meyering <jim@meyering.net>
Thu, 16 Aug 2001 05:47:48 +0000 (05:47 +0000)
include the first offending argument in the diagnostic.
Suggestion from Karl Berry.

src/date.c

index ac38f87..64aeed4 100644 (file)
@@ -341,7 +341,8 @@ main (int argc, char **argv)
 
   if (n_args > 1)
     {
-      error (0, 0, _("too many non-option arguments"));
+      error (0, 0, _("too many non-option arguments: %s%s"),
+            argv[optind + 1], n_args == 2 ? "" : " ...");
       usage (1);
     }