@@ -206,8 +206,8 @@ int main(int argc, char** argv) {
206206}
207207```
208208
209- For more information about 🚧 `ensure_utf8` the section on
210- [Unicode support](#unicode-support) below. The 🚧 `ensure_utf8` function is only
209+ For more information about 🆕 `ensure_utf8` the section on
210+ [Unicode support](#unicode-support) below. The 🆕 `ensure_utf8` function is only
211211available in main currently and not in a release.
212212
213213<details><summary>Note: If you don't like macros, this is what that macro expands to: (click to expand)</summary><p>
@@ -416,7 +416,7 @@ Before parsing, you can set the following options:
416416 option. Options can be removed from the excludes list with
417417 ` ->remove_excludes(opt) `
418418- ` ->envname(name) ` : Gets the value from the environment if present and not
419- passed on the command line. 🚧 The value must also pass any validators to be
419+ passed on the command line. 🆕 The value must also pass any validators to be
420420 used.
421421- ` ->group(name) ` : The help group to put the option in. No effect for positional
422422 options. Defaults to ` "Options" ` . Options given an empty string will not show
@@ -452,7 +452,7 @@ Before parsing, you can set the following options:
452452 are ` CLI::MultiOptionPolicy::Throw ` , ` CLI::MultiOptionPolicy::Throw ` ,
453453 ` CLI::MultiOptionPolicy::TakeLast ` , ` CLI::MultiOptionPolicy::TakeFirst ` ,
454454 ` CLI::MultiOptionPolicy::Join ` , ` CLI::MultiOptionPolicy::TakeAll ` ,
455- ` CLI::MultiOptionPolicy::Sum ` 🆕 , and ` CLI::MultiOptionPolicy::Reverse ` 🚧 .
455+ ` CLI::MultiOptionPolicy::Sum ` , and ` CLI::MultiOptionPolicy::Reverse ` 🆕 .
456456- ` ->check(std::string(const std::string &), validator_name="",validator_description="") ` :
457457 Define a check function. The function should return a non empty string with
458458 the error message if the check fails
@@ -694,15 +694,15 @@ NOTES: If the container used in `IsMember`, `Transformer`, or
694694fast search is performed first, and if that fails a linear search with the
695695filters on the key values is performed.
696696
697- - `CLI::FileOnDefaultPath(default_path)`: 🆕 can be used to check for files in a
697+ - `CLI::FileOnDefaultPath(default_path)`: can be used to check for files in a
698698 default path. If used as a transform it will first check that a file exists,
699699 if it does nothing further is done, if it does not it tries to add a default
700700 Path to the file and search there again. If the file does not exist an error
701701 is returned normally but this can be disabled using
702702 `CLI::FileOnDefaultPath(default_path, false)`. This allows multiple paths to
703703 be chained using multiple transform calls.
704704
705- - `CLI::EscapedString`: 🚧 can be used to process an escaped string. The
705+ - `CLI::EscapedString`: 🆕 can be used to process an escaped string. The
706706 processing is equivalent to that used for TOML config files, see
707707 [TOML strings](https://toml.io/en/v1.0.0#string). With 2 notable exceptions.
708708 \` can also be used as a literal string notation, and it also allows binary
@@ -874,7 +874,7 @@ nameless subcommands are allowed. Callbacks for nameless subcommands are only
874874triggered if any options from the subcommand were parsed. Subcommand names given
875875through the ` add_subcommand ` method have the same restrictions as option names.
876876
877- 🚧 Options or flags in a subcommand may be directly specified using dot notation
877+ 🆕 Options or flags in a subcommand may be directly specified using dot notation
878878
879879- ` --subcommand.long=val ` (long subcommand option)
880880- ` --subcommand.long val ` (long subcommand option)
@@ -886,7 +886,7 @@ through the `add_subcommand` method have the same restrictions as option names.
886886The use of dot notation in this form is equivalent ` --subcommand.long <args> ` =>
887887` subcommand --long <args> ++ ` . Nested subcommands also work ` sub1.subsub ` would
888888trigger the subsub subcommand in ` sub1 ` . This is equivalent to "sub1 subsub".
889- Quotes around the subcommand names are permitted 🚧 following the TOML standard
889+ Quotes around the subcommand names are permitted 🆕 following the TOML standard
890890for such specification. This includes allowing escape sequences. For example
891891` "subcommand".'f' ` or ` "subcommand.with.dots".arg1 = value ` .
892892
@@ -926,9 +926,9 @@ option_groups. These are:
926926 before matching. Validation is specified through ` transform ` , ` check ` , and
927927 ` each ` for an option. If an argument fails validation it is not an error and
928928 matching proceeds to the next available positional or extra arguments.
929- - ` .validate_optional_arguments() ` :🆕 Specify that optional arguments should
930- pass validation before being assigned to an option. Validation is specified
931- through ` transform ` , ` check ` , and ` each ` for an option. If an argument fails
929+ - ` .validate_optional_arguments() ` : Specify that optional arguments should pass
930+ validation before being assigned to an option. Validation is specified through
931+ ` transform ` , ` check ` , and ` each ` for an option. If an argument fails
932932 validation it is not an error and matching proceeds to the next available
933933 positional subcommand or extra arguments.
934934- ` .excludes(option_or_subcommand) ` : If given an option pointer or pointer to
@@ -1014,9 +1014,9 @@ option_groups. These are:
10141014- ` .prefix_command() ` : Like ` allow_extras ` , but stop immediately on the first
10151015 unrecognized item. It is ideal for allowing your app or subcommand to be a
10161016 "prefix" to calling another app.
1017- - ` .usage(message) ` : 🚧 Replace text to appear at the start of the help string
1017+ - ` .usage(message) ` : 🆕 Replace text to appear at the start of the help string
10181018 after description.
1019- - ` .usage(std::string()) ` : 🚧 Set a callback to generate a string that will
1019+ - ` .usage(std::string()) ` : 🆕 Set a callback to generate a string that will
10201020 appear at the start of the help string after description.
10211021- ` .footer(message) ` : Set text to appear at the bottom of the help string.
10221022- ` .footer(std::string()) ` : Set a callback to generate a string that will appear
@@ -1223,8 +1223,8 @@ is present, it will be read along with the normal command line arguments. The
12231223file will be read if it exists, and does not throw an error unless ` required ` is
12241224` true ` . Configuration files are in [ TOML] [ ] format by default, though the
12251225default reader can also accept files in INI format as well. The config reader
1226- can read most aspects of TOML files including strings both literal 🚧 and with
1227- potential escape sequences 🚧 , digit separators 🚧 , and multi-line strings 🚧 ,
1226+ can read most aspects of TOML files including strings both literal 🆕 and with
1227+ potential escape sequences 🆕 , digit separators 🆕 , and multi-line strings 🆕 ,
12281228and run them through the CLI11 parser. Other formats can be added by an adept
12291229user, some variations are available through customization points in the default
12301230formatter. An example of a TOML file:
@@ -1297,9 +1297,9 @@ boolean values are not quoted.
12971297
12981298For options or flags which allow 0 arguments to be passed using an empty string
12991299in the config file, `{}`, or `[]` will convert the result to the default value
1300- specified via `default_str` or `default_val` on the option 🆕 . If no user
1301- specified default is given the result is an empty string or the converted value
1302- of an empty string.
1300+ specified via `default_str` or `default_val` on the option. If no user specified
1301+ default is given the result is an empty string or the converted value of an
1302+ empty string.
13031303
13041304NOTE: Transforms and checks can be used with the option pointer returned from
13051305set_config like any other option to validate the input if needed. It can also be
@@ -1427,8 +1427,8 @@ CLI11 supports Unicode and wide strings as defined in the
14271427
14281428When using the command line on Windows with unicode arguments, your `main`
14291429function may already receive broken Unicode. Parsing `argv` at that point will
1430- not give you a correct string. To fix this, you have three good options and two
1431- bad ones :
1430+ not give you a correct string. To fix this, you have three options; the first is
1431+ recommended for cross-platform support :
14321432
143314331\. Replace `argv` with `app.ensure_utf8(argv)` before any arguments are parsed.
14341434`ensure_utf8` will do nothing on systems where `argv` is already in UTF-8 (Such
@@ -1445,40 +1445,13 @@ int main(int argc, char** argv) {
14451445}
14461446```
14471447
1448- 2\. If you pass unmodified command-line arguments to CLI11, call ` app.parse() `
1449- instead of ` app.parse(argc, argv) ` (or ` CLI11_PARSE(app) ` instead of
1450- ` CLI11_PARSE(app, argc, argv) ` ). The library will find correct arguments by
1451- itself.
1448+ Be sure you do not modify ` argv ` before this function call, as the correct
1449+ values will be reconstructed using Windows APIs and produced by this call. It
1450+ has no effect on other platforms and just passes through ` argv ` .
14521451
1453- > [ !NOTE]
1454- >
1455- > This approach may not work on weird OS configurations, such as when the
1456- > ` /proc ` dir is missing on Linux systems (see also
1457- > [ #845 ] ( https://github.com/CLIUtils/CLI11/issues/845 ) ).
1458- >
1459- > ``` cpp
1460- > int main () {
1461- > CLI::App app;
1462- > // ...
1463- > CLI11_PARSE(app);
1464- > }
1465- > ```
1466-
1467- 3\. Get correct arguments with which the program was originally executed using
1468- provided functions: `CLI::argc()` and `CLI::argv()`. These three methods are the
1469- only cross-platform ways of handling unicode correctly.
1470-
1471- ```cpp
1472- int main() {
1473- CLI::App app;
1474- // ...
1475- CLI11_PARSE(app, CLI::argc(), CLI::argv());
1476- }
1477- ```
1478-
1479- <details ><summary >Bad options (click to expand)</summary ><p >
1452+ <details ><summary >Other options (click to expand)</summary ><p >
14801453
1481- 4 \. Use the Windows-only non-standard ` wmain ` function, which accepts
1454+ 2 \. Use the Windows-only non-standard ` wmain ` function, which accepts
14821455` wchar_t *argv[] ` instead of ` char* argv[] ` . Parsing this will allow CLI to
14831456convert wide strings to UTF-8 without losing information.
14841457
@@ -1490,10 +1463,10 @@ int wmain(int argc, wchar_t *argv[]) {
14901463}
14911464```
14921465
1493- 5 \. Retrieve arguments yourself by using Windows APIs like
1466+ 3 \. Retrieve arguments yourself by using Windows APIs like
14941467[`CommandLineToArgvW`](https://learn.microsoft.com/en-us/windows/win32/api/shellapi/nf-shellapi-commandlinetoargvw)
14951468and pass them to CLI. This is what the library is doing under the hood in
1496- `CLI::argv() `.
1469+ `ensure_utf8 `.
14971470
14981471</p></details>
14991472</br>
0 commit comments