From c3f214e5f820d298129e558d64c10e8826bf84ef Mon Sep 17 00:00:00 2001
From: Boris Kolpackov The name argument is used as a prefix to form the name of the
- usage printing function. It can include the namespace qualification as
- well as documentation variable expansion, for example: The --version
--include-path
|-I
dir<>
)
- options files.--include-path
|-I
dir
dir
for bracket-included
+ (<>
) options files.--output-dir
|-o
dir--output-dir
|-o
dir
dir
instead of the
+ current directory.--std
version--std
version
c++98
(default), c++11
,
and c++14
.argv
array as well as files specified with command line
options.
+ --generate-vector-scanner
vector_scanner
implementation. This scanner
+ is capable of reading command line arguments from
+ vector<string>
.--suppress-inline
--cli-namespace
ns--suppress-cli
.cli
was included, in which case the support types are
+ expected to be provided by its generated code.--cli-namespace
ns
ns
namespace
(cli
by default). The namespace can be nested, for
example details::cli
. If the namespace is empty, then
the support types are generated in the global namespace.--ostream-type
type--ostream-type
type
std::ostream
that should be used to print usage and
exception information.--generate-cxx
--generate-man
nor
- --generate-html
is specified, this mode is assumed by
+ --generate-man
,
+ --generate-html
, nor
+ --generate-txt
is specified, this mode is assumed by
default.--generate-man
--generate-html
--generate-txt
--stdout
--page-usage
name--page-usage
name
name
argument is used as a prefix to form the
+ name of the usage printing function. It can include the namespace
+ qualification as well as documentation variable expansion, for
+ example:--page-usage print_ # print_usage() in global namespace
--page-usage app::print_ # print_usage() in app namespace
@@ -182,18 +199,18 @@
--short-usage
options are specified, then the long
usage function has the *long_usage()
suffix.
--option-length
len--option-length
len
len
characters when
+ printing usage. This is useful when you have multiple options classes,
+ potentially in separate files, and would like their usage to have the same
+ indentation level.--ansi-color
less(1)
, it will display them correctly.less(1)
, it will display them correctly.
--exclude-base
--class-doc
name=kindapp::options
.
- The kind value can be short
,
- long
, or exclude
. If the value is
- exclude
, then the class documentation is excluded from
- usage and man/HTML output. For usage, the short
and
+ --class-doc
name
=kind
kind
that should be used
+ for the options class name
. The
+ name
value should be a fully-qualified class name, for
+ example, app::options
. The kind
+ value can be short
, long
, or
+ exclude
. If the value is exclude
,
+ then the class documentation is excluded from usage and man/HTML/text
+ output. For usage, the short
and
long
values determine which usage function will be
called when the class is used as base or as part of the page usage (see
- --page-usage
). For man/HTML, these values determine
- which documentation strings are used in the output.--class
nameapp::options
. To generate
- documentation for multiple classes, repeat this option and the
- documentation will be produced in the order specified. This functionality
- is useful if you need to assemble documentation from multiple classes in a
- specific order or to insert custom documentation between options belonging
- to different classes.--docvar
|-v
name=val--*-prologue*
and --*-epilogue*
- options) using the $
name$
+ --page-usage
). For man/HTML/text, these values
+ determine which documentation strings are used in the output.--class
name
name
. The name
value
+ should be a fully-qualified options class name, for example,
+ app::options
. To generate documentation for multiple
+ classes, repeat this option and the documentation will be produced in the
+ order specified. This functionality is useful if you need to assemble
+ documentation from multiple classes in a specific order or to insert
+ custom documentation between options belonging to different classes.--docvar
|-v
name
=val
name
to the value
+ val
. Documentation variables can be substituted in
+ prologues and epilogues (see --*-prologue*
and
+ --*-epilogue*
options) using the
+ $
name
$
expansion syntax (use $$
to escape expansion). They
can also be defined in .cli
files using the
- "\name=val"
syntax."\name
=val
"
+ syntax.
+
+ --link-regex
regex
regex
to the list of regular expressions used
+ to transform link targets in the generated documentation. The argument to
+ this option is a Perl-like regular expression in the form
+ /pattern/replacement/
. Any
+ character can be used as a delimiter instead of '/
'
+ and the delimiter can be escaped inside pattern
and
+ replacement
with a backslash (\
).
+ You can specify multiple regular expressions by repeating this option. All
+ the regular expressions are tried in the order specified and the first
+ expression that matches is used. Use the
+ --link-regex-trace
option to debug link
+ transformation.--link-regex-trace
--link-regex
option. Use this option to find out why
+ your regular expressions don't do what you expected them to do.--html-heading-map
c
=h
c
(valid values:
+ 'H
', '0
', '1
',
+ 'h
', and '2
') to HTML heading
+ h
(for example, 'h1
',
+ 'h2
', etc).--omit-link-check
--hxx-prologue
text
text
at the beginning of the generated C++
+ header file.--hxx-prologue
text--ixx-prologue
text
text
at the beginning of the generated C++
+ inline file.--cxx-prologue
text
text
at the beginning of the generated C++
+ source file.--man-prologue
text
text
at the beginning of the generated man
+ page file.--html-prologue
text
text
at the beginning of the generated HTML
file.--ixx-prologue
text--txt-prologue
text
text
at the beginning of the generated text
file.--cxx-prologue
text--hxx-epilogue
text
text
at the end of the generated C++ header
file.--man-prologue
text--ixx-epilogue
text
text
at the end of the generated C++ inline
file.--html-prologue
text--cxx-epilogue
text
text
at the end of the generated C++ source
+ file.--hxx-epilogue
text--man-epilogue
text
text
at the end of the generated man page
+ file.--ixx-epilogue
text--html-epilogue
text
text
at the end of the generated HTML
+ file.--cxx-epilogue
text--txt-epilogue
text
text
at the end of the generated text
+ file.--man-epilogue
text--hxx-prologue-file
file
file
at the beginning of the
+ generated C++ header file.--html-epilogue
text--ixx-prologue-file
file
file
at the beginning of the
+ generated C++ inline file.--hxx-prologue-file
file--cxx-prologue-file
file
file
at the beginning of the
+ generated C++ source file.--ixx-prologue-file
file--man-prologue-file
file
file
at the beginning of the
+ generated man page file.--cxx-prologue-file
file--html-prologue-file
file
file
at the beginning of the
+ generated HTML file.--man-prologue-file
file--txt-prologue-file
file
file
at the beginning of the
+ generated text file.--html-prologue-file
file--hxx-epilogue-file
file
file
at the end of the
+ generated C++ header file.--hxx-epilogue-file
file--ixx-epilogue-file
file
file
at the end of the
+ generated C++ inline file.--ixx-epilogue-file
file--cxx-epilogue-file
file
file
at the end of the
+ generated C++ source file.--cxx-epilogue-file
file--man-epilogue-file
file
file
at the end of the
+ generated man page file.--man-epilogue-file
file--html-epilogue-file
file
file
at the end of the
+ generated HTML file.--html-epilogue-file
file--txt-epilogue-file
file
file
at the end of the
+ generated text file.--output-prefix
prefix--output-prefix
prefix
prefix
at the beginning of the generated
+ output file name(s).--output-suffix
suffix--output-suffix
suffix
suffix
at the end of the generated output file
+ name(s). Note that it is added before any file type-specific suffixes; see
--*-suffix
below.--hxx-suffix
suffix.hxx
to
- construct the name of the generated header file.--hxx-suffix
suffix
suffix
instead of the default
+ .hxx
to construct the name of the generated header
+ file.--ixx-suffix
suffix
suffix
instead of the default
+ .ixx
to construct the name of the generated inline
+ file.--ixx-suffix
suffix.ixx
to
- construct the name of the generated inline file.--cxx-suffix
suffix
suffix
instead of the default
+ .cxx
to construct the name of the generated source
+ file.--cxx-suffix
suffix.cxx
to
- construct the name of the generated source file.--man-suffix
suffix
suffix
instead of the default
+ .1
to construct the name of the generated man page
+ file.--man-suffix
suffix.1
to
- construct the name of the generated man page file.--html-suffix
suffix
suffix
instead of the default
+ .html
to construct the name of the generated HTML
+ file.--html-suffix
suffix.html
to
- construct the name of the generated HTML file.--txt-suffix
suffix
suffix
instead of the default
+ .txt
to construct the name of the generated text
+ file.--option-prefix
prefix-
as an
- option prefix. Unknown command line arguments that start with this prefix
- are treated as unknown options. If you set the option prefix to the empty
- value, then all the unknown command line arguments will be treated as
- program arguments.--option-prefix
prefix
prefix
instead of the default
+ '-
' as an option prefix. Unknown command line
+ arguments that start with this prefix are treated as unknown options. If
+ you set the option prefix to the empty value, then all the unknown command
+ line arguments will be treated as program arguments.--option-separator
sep--
as an
- optional separator between options and arguments. All the command line
- arguments that are parsed after this separator are treated as program
- arguments. Set the option separator to the empty value if you don't want
- this functionality.--option-separator
sep
sep
instead of the default
+ '--
' as an optional separator between options and
+ arguments. All the command line arguments that are parsed after this
+ separator are treated as program arguments. Set the option separator to
+ the empty value if you don't want this functionality.--include-with-brackets
#include
directives.--include-prefix
prefix#include
- directive paths.--guard-prefix
prefix--reserved-name
name=rep--options-file
file#
are ignored. Option
- values can be enclosed in double ("
) or single
- ('
) quotes to preserve leading and trailing
+ <>
) instead of quotes
+ (""
) in the generated #include
+ directives.--include-prefix
prefix
prefix
to the generated
+ #include
directive paths.--guard-prefix
prefix
prefix
to the generated header inclusion
+ guards. The prefix is transformed to upper case and characters that are
+ illegal in a preprocessor macro name are replaced with underscores.--reserved-name
name
=rep
name
with an optional rep
+ replacement to the list of names that should not be used as identifiers.
+ If provided, the replacement name is used instead. All C++ keywords are
+ already in this list.--options-file
file
file
with each option
+ appearing on a separate line optionally followed by space and an option
+ value. Empty lines and lines starting with #
are
+ ignored. Option values can be enclosed in double ("
)
+ or single ('
) quotes to preserve leading and trailing
whitespaces as well as to specify empty values. If the value itself
contains trailing or leading quotes, enclose it with an extra pair of
quotes, for example '"x"'
. Non-leading and
--
cgit v1.1