Display mutually exclusive arguments as [[-a]|[-b]] in usage
Add ... trailer to repeatable arguments in usage: `[-x]...```
Implement the following enhancements:
By default usage is reported on a single line.
The ArgumentParser::set_usage_max_line_width(width) method can be used to display the usage() on multiple line, by defining the maximum line width.
It can be accompanied by a call to ArgumentParser::set_usage_break_on_mutex() to ask grouped mutually exclusive arguments to be displayed on a separate line.
Furthermore arguments can be separated into several groups by calling ArgumentParser::add_group(group_name). Only optional arguments should be specified after the first call to add_group().
Display mutually exclusive arguments as
[[-a]|[-b]]
in usageAdd ... trailer to repeatable arguments in usage: `[-x]...```
Implement the following enhancements:
By default usage is reported on a single line.
The
ArgumentParser::set_usage_max_line_width(width)
method can be used to display the usage() on multiple line, by defining the maximum line width.It can be accompanied by a call to
ArgumentParser::set_usage_break_on_mutex()
to ask grouped mutually exclusive arguments to be displayed on a separate line.The following snippet
will display:
Furthermore arguments can be separated into several groups by calling
ArgumentParser::add_group(group_name)
. Only optional arguments should be specified after the first call to add_group().will display: