diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2015-09-01 16:43:18 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2015-09-01 16:43:18 +0200 |
commit | 957fd18c38e3bb1c9c489b40a0cbdf865e821294 (patch) | |
tree | 1e83341cb2d5407ce7733059da46aef3d6b70aeb /cli/html.cxx | |
parent | 60c5e99d211d0abc62c7cce7a52adb55c24e3a5d (diff) |
Allow specification of argument documentation for flags
If all three documentation strings are specified for a bool option,
then the usage, html, and man documentation will include the argument
documentation (first string), just like for non-flag options. This is
primarily useful for using options to handle commands where you may
want to end up with something like "help [<options>] <command>".
Diffstat (limited to 'cli/html.cxx')
-rw-r--r-- | cli/html.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cli/html.cxx b/cli/html.cxx index 8897f4e..1b60827 100644 --- a/cli/html.cxx +++ b/cli/html.cxx @@ -44,7 +44,7 @@ namespace std::set<string> arg_set; - if (type != "bool") + if (type != "bool" || doc.size () >= 3) { string s ( translate_arg ( @@ -60,7 +60,7 @@ namespace // If we have both the long and the short descriptions, use // the long one. // - if (type == "bool") + if (type == "bool" && doc.size () < 3) { if (doc.size () > 1) d = doc[1]; |