summaryrefslogtreecommitdiffhomepage
path: root/src/internal/argv
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
commit4bdc5895b604b86c55234342953dca1526c8bf53 (patch)
tree99bd73e8b1e869d67775a717f39cb4ed00312ec0 /src/internal/argv
parentf25e99732f9152a8aac08c982121fe300dc8e056 (diff)
downloadptycon-4bdc5895b604b86c55234342953dca1526c8bf53.tar.bz2
ptycon-4bdc5895b604b86c55234342953dca1526c8bf53.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.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/internal/argv/argv.h b/src/internal/argv/argv.h
index 3b54f73..9bb4188 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 ? "{" : "",