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 | 50f353fb2291f0d0a63ef755855e9386bae9e765 (patch) | |
tree | 4552440a5d8aad046d742f5df34de33da41b3b3e /src/internal/argv | |
parent | 425fb8814610df64d14b514302f11a20f8b52500 (diff) | |
download | perk-50f353fb2291f0d0a63ef755855e9386bae9e765.tar.bz2 perk-50f353fb2291f0d0a63ef755855e9386bae9e765.tar.xz |
argv.h: argv_show_error(): refine the 'option X requires a value' error msg.
Diffstat (limited to 'src/internal/argv')
-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 4633a8a..f6c8b6d 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 ? "{" : "", |