summaryrefslogtreecommitdiff
path: root/src/internal
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2022-12-21 14:11:26 +0000
committermidipix <writeonce@midipix.org>2022-12-21 14:13:02 +0000
commit9c783141692414c032750cb4968aabcd9fde55ca (patch)
tree2a45c904157f5019430116c81d6b1a254f412378 /src/internal
parentde0d70f96aa435e938c59ef3c7239f662f7d87f8 (diff)
downloadtpax-9c783141692414c032750cb4968aabcd9fde55ca.tar.bz2
tpax-9c783141692414c032750cb4968aabcd9fde55ca.tar.xz
argv.h: argv_show_error(): refine the 'option X requires a value' error msg.
Diffstat (limited to 'src/internal')
-rw-r--r--src/internal/argv/argv.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/internal/argv/argv.h b/src/internal/argv/argv.h
index 3f89c31..dee732e 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 ? "{" : "",