author | Stephen Boyd <bebarino@gmail.com> | |
Thu, 21 May 2009 07:33:17 +0000 (00:33 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 23 May 2009 05:46:04 +0000 (22:46 -0700) | ||
commit | 29f25d493c1021a53acf41e5763e732217dd75c3 | |
tree | bd8cd30ac668fc61db313ce920dd2f3e5658079b | tree | snapshot |
parent | 5acb3e5012966cc11e54f50e0592b3639bade02c | commit | diff |
parse-options: add PARSE_OPT_LITERAL_ARGHELP for complicated argh's
Usually, the argh element in struct option points at a placeholder value
(e.g. "val"), and is shown in the usage message as
--option=<val>
by enclosing the string inside of angle brackets.
When the option is more complex (e.g. optional arguments separated by a
comma), you would want to produce a usage message that looks like
--option=<val1>[,<val2>]
In such a case, the caller can pass a string to argh with placeholders
already enclosed in necessary angle brackets (e.g. "<val1>[,<val2>]")
and set this flag.
Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Usually, the argh element in struct option points at a placeholder value
(e.g. "val"), and is shown in the usage message as
--option=<val>
by enclosing the string inside of angle brackets.
When the option is more complex (e.g. optional arguments separated by a
comma), you would want to produce a usage message that looks like
--option=<val1>[,<val2>]
In such a case, the caller can pass a string to argh with placeholders
already enclosed in necessary angle brackets (e.g. "<val1>[,<val2>]")
and set this flag.
Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
parse-options.c | diff | blob | history | |
parse-options.h | diff | blob | history |