Commit 165c6a1e9d7b3feec2104761b46552d8ceb1081f

Authored by Henry Fredrick Schreiner
1 parent 54308171

Preparing for version 1.5.1

CHANGELOG.md
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 * Add missing getters `get_options` and `get_description` to App [#105] 6 * Add missing getters `get_options` and `get_description` to App [#105]
5 * The app name now can be set, and will override the auto name if present [#105] 7 * The app name now can be set, and will override the auto name if present [#105]
6 * Add `(REQUIRED)` for required options [#104] 8 * Add `(REQUIRED)` for required options [#104]
7 * Print simple name for Needs/Excludes [#104] 9 * Print simple name for Needs/Excludes [#104]
8 * Use Needs instead of Requires in help print [#104] 10 * Use Needs instead of Requires in help print [#104]
  11 +* Groups now are listed in the original definition order [#106]
9 12
10 [#102]: https://github.com/CLIUtils/CLI11/issues/102 13 [#102]: https://github.com/CLIUtils/CLI11/issues/102
11 -[#105]: https://github.com/CLIUtils/CLI11/issues/105  
12 [#104]: https://github.com/CLIUtils/CLI11/pull/104 14 [#104]: https://github.com/CLIUtils/CLI11/pull/104
  15 +[#105]: https://github.com/CLIUtils/CLI11/issues/105
  16 +[#106]: https://github.com/CLIUtils/CLI11/pull/106
13 17
14 18
15 ## Version 1.5: Optionals 19 ## Version 1.5: Optionals
README.md
@@ -241,12 +241,16 @@ There are several options that are supported on the main app and subcommands. Th @@ -241,12 +241,16 @@ There are several options that are supported on the main app and subcommands. Th
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. 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 * `.require_subcommand(min, max)`: Explicitly set min and max allowed subcommands. Setting `max` to 0 is unlimited. 242 * `.require_subcommand(min, max)`: Explicitly set min and max allowed subcommands. Setting `max` to 0 is unlimited.
243 * `.add_subcommand(name, description="")` Add a subcommand, returns a pointer to the internally stored subcommand. 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 * `.set_callback(void() function)`: Set the callback that runs at the end of parsing. The options have already run at this point. 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 * `.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. 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 * `.set_footer(message)`: Set text to appear at the bottom of the help string. 255 * `.set_footer(message)`: Set text to appear at the bottom of the help string.
252 * `.set_failure_message(func)`: Set the failure message function. Two provided: `CLI::FailureMessage::help` and `CLI::FailureMessage::simple` (the default). 256 * `.set_failure_message(func)`: Set the failure message function. Two provided: `CLI::FailureMessage::help` and `CLI::FailureMessage::simple` (the default).
include/CLI/Version.hpp
@@ -9,7 +9,7 @@ namespace CLI { @@ -9,7 +9,7 @@ namespace CLI {
9 9
10 #define CLI11_VERSION_MAJOR 1 10 #define CLI11_VERSION_MAJOR 1
11 #define CLI11_VERSION_MINOR 5 11 #define CLI11_VERSION_MINOR 5
12 -#define CLI11_VERSION_PATCH 0  
13 -#define CLI11_VERSION "1.5.0" 12 +#define CLI11_VERSION_PATCH 1
  13 +#define CLI11_VERSION "1.5.1"
14 14
15 } // namespace CLI 15 } // namespace CLI