summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2001-08-16 05:47:48 +0000
committerJim Meyering <jim@meyering.net>2001-08-16 05:47:48 +0000
commit652303d9079f34d7484c4b9410582885dbbd3509 (patch)
tree41569c3c3f8fcefd49454da83f799f6562dd39b5
parent4ebfbeef6db2ebdb29a66a673a5eec3852307548 (diff)
downloadcoreutils-652303d9079f34d7484c4b9410582885dbbd3509.tar.xz
(main): When there are too many non-option arguments,
include the first offending argument in the diagnostic. Suggestion from Karl Berry.
-rw-r--r--src/date.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/date.c b/src/date.c
index ac38f87fa..64aeed4a2 100644
--- a/src/date.c
+++ b/src/date.c
@@ -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);
}