diff options
author | Miles Bader <miles@gnu.org> | 1996-05-22 04:12:25 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 1996-05-22 04:12:25 +0000 |
commit | c1fb9e35f30949eed8af0be619f93bd57f330438 (patch) | |
tree | 68743f7a878e51c395c644f463b0551a21cdcb65 /libshouldbeinlibc | |
parent | 1b71d030931b7a03baf0f2814bd4c3f67bd20748 (diff) |
(argp_parse): Only print a `Try...' message if the error was a parsing error.
Diffstat (limited to 'libshouldbeinlibc')
-rw-r--r-- | libshouldbeinlibc/argp-parse.c | 3 |
1 files changed, 2 insertions, 1 deletions
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++) |