diff options
author | midipix <writeonce@midipix.org> | 2022-12-21 14:11:26 +0000 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2022-12-21 14:13:01 +0000 |
commit | f79c64f2958d18c3013c344a8065c611b2361256 (patch) | |
tree | c64102304da03aacd81516e659e03fe8c4125d5e | |
parent | 84312f6ec1d30ca5182dcda43ae3b39559844307 (diff) | |
download | apimagic-f79c64f2958d18c3013c344a8065c611b2361256.tar.bz2 apimagic-f79c64f2958d18c3013c344a8065c611b2361256.tar.xz |
argv.h: argv_show_error(): refine the 'option X requires a value' error msg.
-rw-r--r-- | src/internal/argv/argv.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/internal/argv/argv.h b/src/internal/argv/argv.h index 95a7f03..fe183ad 100644 --- a/src/internal/argv/argv.h +++ b/src/internal/argv/argv.h @@ -563,7 +563,9 @@ static void argv_show_error(int fd, struct argv_ctx * ctx) opt_short_name[0] ? "-" : "", opt_short_name, opt_short_name[0] ? "," : "", - ctx->erropt->long_name ? "--" : "", + ctx->erropt->long_name + ? (ctx->erropt->flags & ARGV_OPTION_HYBRID_ONLY) ? "-" : "--" + : "", ctx->erropt->long_name, ctx->erropt->paradigm ? "one of the following values:" : "a value", ctx->erropt->paradigm ? "{" : "", |