From c1fb9e35f30949eed8af0be619f93bd57f330438 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Wed, 22 May 1996 04:12:25 +0000 Subject: (argp_parse): Only print a `Try...' message if the error was a parsing error. --- libshouldbeinlibc/argp-parse.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libshouldbeinlibc/argp-parse.c') diff --git a/libshouldbeinlibc/argp-parse.c b/libshouldbeinlibc/argp-parse.c index 8ec7f223..3f9e3e8c 100644 --- a/libshouldbeinlibc/argp-parse.c +++ b/libshouldbeinlibc/argp-parse.c @@ -623,7 +623,8 @@ argp_parse (const struct argp *argp, int argc, char **argv, unsigned flags, if (err) { /* Maybe print an error message. */ - argp_state_help (&state, stderr, ARGP_HELP_STD_ERR); + if (err == EBADKEY) + argp_state_help (&state, stderr, ARGP_HELP_STD_ERR); /* Since we didn't exit, give each parser an error indication. */ for (group = groups; group < egroup; group++) -- cgit v1.2.3