You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+7-3Lines changed: 7 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,15 +1,19 @@
1
-
## In progress
1
+
## Version 1.5.1: Access
2
2
3
-
* Make unlimited positionals vs. unlimited options more intuitive [#102]
3
+
This patch release adds better access to the App progromatically, to assist with writing custom converters to other formats. It also improves the help output, and uses a new feature in CLI11 1.5 to fix an old "quirk" in the way unlimited options and positionals interact.
4
+
5
+
* Make mixing unlimited positionals and options more intuitive [#102]
4
6
* Add missing getters `get_options` and `get_description` to App [#105]
5
7
* The app name now can be set, and will override the auto name if present [#105]
6
8
* Add `(REQUIRED)` for required options [#104]
7
9
* Print simple name for Needs/Excludes [#104]
8
10
* Use Needs instead of Requires in help print [#104]
11
+
* Groups now are listed in the original definition order [#106]
Copy file name to clipboardExpand all lines: README.md
+9-5Lines changed: 9 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -241,12 +241,16 @@ There are several options that are supported on the main app and subcommands. Th
241
241
*`.require_subcommand(N)`: Require `N` subcommands if `N>0`, or up to `N` if `N<0`. `N=0` resets to the default 0 or more.
242
242
*`.require_subcommand(min, max)`: Explicitly set min and max allowed subcommands. Setting `max` to 0 is unlimited.
243
243
*`.add_subcommand(name, description="")` Add a subcommand, returns a pointer to the internally stored subcommand.
244
-
*`.got_subcommand(App_or_name)`: Check to see if a subcommand was received on the command line
245
-
*`.get_subcommands()`: The list of subcommands given on the command line
246
-
*`.get_parent()`: Get the parent App or nullptr if called on master App
247
-
*`.parsed()`: True if this subcommand was given on the command line
244
+
*`.got_subcommand(App_or_name)`: Check to see if a subcommand was received on the command line.
245
+
*`.get_subcommands()`: The list of subcommands given on the command line.
246
+
*`.get_parent()`: Get the parent App or nullptr if called on master App.
247
+
*`.get_options()`: Get the list of all defined option pointers (useful for processing the app for custom output formats).
248
+
*`.parse_order()`: Get the list of option pointers in the order they were parsed (including duplicates).
249
+
*`.get_description()`: Access the description.
250
+
*`.parsed()`: True if this subcommand was given on the command line.
251
+
*`.set_name(name)`: Add or change the name.
248
252
*`.set_callback(void() function)`: Set the callback that runs at the end of parsing. The options have already run at this point.
249
-
*`.allow_extras()`: Do not throw an error if extra arguments are left over
253
+
*`.allow_extras()`: Do not throw an error if extra arguments are left over.
250
254
*`.prefix_command()`: Like `allow_extras`, but stop immediately on the first unrecognised item. It is ideal for allowing your app or subcommand to be a "prefix" to calling another app.
251
255
*`.set_footer(message)`: Set text to appear at the bottom of the help string.
252
256
*`.set_failure_message(func)`: Set the failure message function. Two provided: `CLI::FailureMessage::help` and `CLI::FailureMessage::simple` (the default).
0 commit comments