Version 1.7: Parse breakup
The parsing procedure now maps much more sensibly to complex, nested subcommand structures. Each phase of the parsing happens on all subcommands before moving on with the next phase of the parse. This allows several features, like required environment variables, to work properly even through subcommand boundaries.
Passing the same subcommand multiple times is better supported. Several new features were added as well, including Windows style option support, parsing strings directly, and ignoring underscores in names. Adding a set that you plan to change later must now be done with add_mutable_set
.
- Support Windows style options with
->allow_windows_style_options
. #187 On by default on Windows. #190 - Added
parse(string)
to split up and parse a command-line style string directly. #186 - Added
ignore_underscore
and related functions, to ignore underscores when matching names. #185 - The default INI Config will now add quotes to strings with spaces #195
- The default message now will mention the help-all flag also if present #197
- Added
->description
to set Option descriptions #199 - Mutating sets (introduced in Version 1.6) now have a clear add method,
add_mutable_set*
, since the set reference should not expire #200 - Subcommands now track how many times they were parsed in a parsing process.
count()
with no arguments will return the number of times a subcommand was encountered. #179 - Parsing is now done in phases:
shortcurcuits
,ini
,env
,callbacks
, andrequirements
; all subcommands complete a phase before moving on. #179 - Calling parse multiple times is now officially supported without
clear
(automatic). #179 - Dropped the mostly undocumented
short_circuit
property, as help flag parsing is a bit more complex, and the default callback behavior of options now works properly. #179 - Use the standard
BUILD_TESTING
overCLI11_TESTING
if defined (CLI11_TESTING
may eventually be removed) #183 - Cleanup warnings #191
- Remove deprecated names:
set_footer
,set_name
,set_callback
, andset_type_name
. Use without theset_
instead. #192
Converting from CLI11 1.6:
->short_circuit()
is no longer needed, just remove it if you were using it - raising an exception will happen in the proper place now without it.->add_set*
becomes->add_mutable_set*
if you were using the editable set featurefooter
,name
,callback
, andtype_name
must be used instead of theset_*
versions (deprecated previously).