@@ -165,6 +165,9 @@ this library:
165
165
option to disable it).
166
166
- Autocomplete: This might eventually be added to both Plumbum and CLI11, but it
167
167
is not supported yet.
168
+ - While not recommended, CLI11 does now support non standard option names such
169
+ as ` -option ` . 🆕. This is enabled through ` allow_non_standard_option_names() `
170
+ modifier on an app.
168
171
169
172
## Install
170
173
@@ -203,9 +206,8 @@ int main(int argc, char** argv) {
203
206
}
204
207
```
205
208
206
- For more information about 🆕`ensure_utf8` the section on
207
- [Unicode support](#unicode-support) below. The 🆕`ensure_utf8` function is only
208
- available in main currently and not in a release.
209
+ For more information about `ensure_utf8` the section on
210
+ [Unicode support](#unicode-support) below.
209
211
210
212
<details><summary>Note: If you don't like macros, this is what that macro expands to: (click to expand)</summary><p>
211
213
@@ -415,7 +417,7 @@ Before parsing, you can set the following options:
415
417
option. Options can be removed from the excludes list with
416
418
` ->remove_excludes(opt) `
417
419
- ` ->envname(name) ` : Gets the value from the environment if present and not
418
- passed on the command line. 🆕 The value must also pass any validators to be
420
+ passed on the command line. The value must also pass any validators to be
419
421
used.
420
422
- ` ->group(name) ` : The help group to put the option in. No effect for positional
421
423
options. Defaults to ` "Options" ` . Options given an empty string will not show
@@ -451,7 +453,7 @@ Before parsing, you can set the following options:
451
453
are ` CLI::MultiOptionPolicy::Throw ` , ` CLI::MultiOptionPolicy::Throw ` ,
452
454
` CLI::MultiOptionPolicy::TakeLast ` , ` CLI::MultiOptionPolicy::TakeFirst ` ,
453
455
` CLI::MultiOptionPolicy::Join ` , ` CLI::MultiOptionPolicy::TakeAll ` ,
454
- ` CLI::MultiOptionPolicy::Sum ` , and ` CLI::MultiOptionPolicy::Reverse ` 🆕 .
456
+ ` CLI::MultiOptionPolicy::Sum ` , and ` CLI::MultiOptionPolicy::Reverse ` .
455
457
- ` ->check(std::string(const std::string &), validator_name="",validator_description="") ` :
456
458
Define a check function. The function should return a non empty string with
457
459
the error message if the check fails
@@ -701,8 +703,8 @@ filters on the key values is performed.
701
703
`CLI::FileOnDefaultPath(default_path, false)`. This allows multiple paths to
702
704
be chained using multiple transform calls.
703
705
704
- - `CLI::EscapedString`: 🆕 can be used to process an escaped string. The
705
- processing is equivalent to that used for TOML config files, see
706
+ - `CLI::EscapedString`: can be used to process an escaped string. The processing
707
+ is equivalent to that used for TOML config files, see
706
708
[TOML strings](https://toml.io/en/v1.0.0#string). With 2 notable exceptions.
707
709
\` can also be used as a literal string notation, and it also allows binary
708
710
string notation see
@@ -859,7 +861,9 @@ triggered once unless the `.immediate_callback()` flag is set or the callback is
859
861
specified through the ` parse_complete_callback() ` function. The
860
862
` final_callback() ` is triggered only once. In which case the callback executes
861
863
on completion of the subcommand arguments but after the arguments for that
862
- subcommand have been parsed, and can be triggered multiple times.
864
+ subcommand have been parsed, and can be triggered multiple times. Note that the
865
+ ` parse_complete_callback() ` is executed prior to processing any config files.
866
+ The ` final_callback() ` is executed after config file processing.
863
867
864
868
Subcommands may also have an empty name either by calling ` add_subcommand ` with
865
869
an empty string for the name or with no arguments. Nameless subcommands function
@@ -873,7 +877,7 @@ nameless subcommands are allowed. Callbacks for nameless subcommands are only
873
877
triggered if any options from the subcommand were parsed. Subcommand names given
874
878
through the ` add_subcommand ` method have the same restrictions as option names.
875
879
876
- 🆕 Options or flags in a subcommand may be directly specified using dot notation
880
+ Options or flags in a subcommand may be directly specified using dot notation
877
881
878
882
- ` --subcommand.long=val ` (long subcommand option)
879
883
- ` --subcommand.long val ` (long subcommand option)
@@ -885,8 +889,8 @@ through the `add_subcommand` method have the same restrictions as option names.
885
889
The use of dot notation in this form is equivalent ` --subcommand.long <args> ` =>
886
890
` subcommand --long <args> ++ ` . Nested subcommands also work ` sub1.subsub ` would
887
891
trigger the subsub subcommand in ` sub1 ` . This is equivalent to "sub1 subsub".
888
- Quotes around the subcommand names are permitted 🆕 following the TOML standard
889
- for such specification. This includes allowing escape sequences. For example
892
+ Quotes around the subcommand names are permitted following the TOML standard for
893
+ such specification. This includes allowing escape sequences. For example
890
894
` "subcommand".'f' ` or ` "subcommand.with.dots".arg1 = value ` .
891
895
892
896
#### Subcommand options
@@ -902,7 +906,7 @@ option_groups. These are:
902
906
the form of ` /s /long /file:file_name.ext ` This option does not change how
903
907
options are specified in the ` add_option ` calls or the ability to process
904
908
options in the form of ` -s --long --file=file_name.ext ` .
905
- - ` .allow_non_standard_option_names() ` :🚧 Allow specification of single ` - ` long
909
+ - ` .allow_non_standard_option_names() ` :🆕 Allow specification of single ` - ` long
906
910
form option names. This is not recommended but is available to enable
907
911
reworking of existing interfaces. If this modifier is enabled on an app or
908
912
subcommand, options or flags can be specified like normal but instead of
@@ -914,8 +918,8 @@ option_groups. These are:
914
918
through" and be matched on a parent option. Subcommands by default are allowed
915
919
to "fall through" as in they will first attempt to match on the current
916
920
subcommand and if they fail will progressively check parents for matching
917
- subcommands. This can be disabled through ` subcommand_fallthrough(false) ` 🚧 .
918
- - ` .subcommand_fallthrough() ` : 🚧 Allow subcommands to "fall through" and be
921
+ subcommands. This can be disabled through ` subcommand_fallthrough(false) ` 🆕 .
922
+ - ` .subcommand_fallthrough() ` : 🆕 Allow subcommands to "fall through" and be
919
923
matched on a parent option. Disabling this prevents additional subcommands at
920
924
the same level from being matched. It can be useful in certain circumstances
921
925
where there might be ambiguity between subcommands and positionals. The
@@ -1027,10 +1031,10 @@ option_groups. These are:
1027
1031
the first unrecognized item. All subsequent arguments are placed in the
1028
1032
remaining_arg list. It is ideal for allowing your app or subcommand to be a
1029
1033
"prefix" to calling another app.
1030
- - ` .usage(message) ` : 🆕 Replace text to appear at the start of the help string
1034
+ - ` .usage(message) ` : Replace text to appear at the start of the help string
1031
1035
after description.
1032
- - ` .usage(std::string()) ` : 🆕 Set a callback to generate a string that will
1033
- appear at the start of the help string after description.
1036
+ - ` .usage(std::string()) ` : Set a callback to generate a string that will appear
1037
+ at the start of the help string after description.
1034
1038
- ` .footer(message) ` : Set text to appear at the bottom of the help string.
1035
1039
- ` .footer(std::string()) ` : Set a callback to generate a string that will appear
1036
1040
at the end of the help string.
@@ -1113,8 +1117,8 @@ A subcommand is considered terminated when one of the following conditions are
1113
1117
met.
1114
1118
1115
1119
1 . There are no more arguments to process
1116
- 2 . Another subcommand is encountered that would not fit in an optional slot of
1117
- the subcommand
1120
+ 2 . Another subcommand is encountered that would not fit in an optional
1121
+ positional slot of the subcommand
1118
1122
3 . The ` positional_mark ` (` -- ` ) is encountered and there are no available
1119
1123
positional slots in the subcommand.
1120
1124
4 . The ` subcommand_terminator ` mark (` ++ ` ) is encountered
@@ -1246,11 +1250,11 @@ is present, it will be read along with the normal command line arguments. The
1246
1250
file will be read if it exists, and does not throw an error unless ` required ` is
1247
1251
` true ` . Configuration files are in [ TOML] [ ] format by default, though the
1248
1252
default reader can also accept files in INI format as well. The config reader
1249
- can read most aspects of TOML files including strings both literal 🆕 and with
1250
- potential escape sequences 🆕 , digit separators 🆕 , and multi-line strings 🆕,
1251
- and run them through the CLI11 parser. Other formats can be added by an adept
1252
- user, some variations are available through customization points in the default
1253
- formatter. An example of a TOML file:
1253
+ can read most aspects of TOML files including strings both literal and with
1254
+ potential escape sequences, digit separators, and multi-line strings, and run
1255
+ them through the CLI11 parser. Other formats can be added by an adept user, some
1256
+ variations are available through customization points in the default formatter.
1257
+ An example of a TOML file:
1254
1258
1255
1259
``` toml
1256
1260
# Comments are supported, using a #
0 commit comments