[PATCH 5/6] shortlog: correct option help for -w
- From
René Scharfe <l.s.r@web.de>
- Date
- Aug 2, 2018, 19:18 UTC
- Message-ID
- <4e96d2a2-dfdc-3f6f-e2c7-2eb954ed633c@web.de>
- In-Reply-To
- <ad2d8f99-07a3-0191-88a2-c43081657988@web.de>
Wrap the placeholders in the option help string for -w in pairs of angular brackets to document that users need to replace them with actual numbers. Use the flag PARSE_OPT_LITERAL_ARGHELP to prevent parseopt from adding another pair.
Signed-off-by: Rene Scharfe <l.s.r@web.de> --- builtin/shortlog.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/builtin/shortlog.c b/builtin/shortlog.c index 608d6ba77b..f555cf9e4f 100644 --- a/builtin/shortlog.c +++ b/builtin/shortlog.c @@ -268,8 +268,10 @@ int cmd_shortlog(int argc, const char **argv, const char *prefix) N_("Suppress commit descriptions, only provides commit count")), OPT_BOOL('e', "email", &log.email, N_("Show the email address of each author")), - { OPTION_CALLBACK, 'w', NULL, &log, N_("w[,i1[,i2]]"), - N_("Linewrap output"), PARSE_OPT_OPTARG, &parse_wrap_args }, + { OPTION_CALLBACK, 'w', NULL, &log, N_("<w>[,<i1>[,<i2>]]"), + N_("Linewrap output"), + PARSE_OPT_OPTARG | PARSE_OPT_LITERAL_ARGHELP, + &parse_wrap_args }, OPT_END(), };
-- 2.18.0