diff --git a/CHANGELOG.md b/CHANGELOG.md index df0953f5..6acf0b24 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,15 +1,19 @@ -## In progress +## Version 1.5.1: Access -* Make unlimited positionals vs. unlimited options more intuitive [#102] +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. + +* Make mixing unlimited positionals and options more intuitive [#102] * Add missing getters `get_options` and `get_description` to App [#105] * The app name now can be set, and will override the auto name if present [#105] * Add `(REQUIRED)` for required options [#104] * Print simple name for Needs/Excludes [#104] * Use Needs instead of Requires in help print [#104] +* Groups now are listed in the original definition order [#106] [#102]: https://github.com/CLIUtils/CLI11/issues/102 -[#105]: https://github.com/CLIUtils/CLI11/issues/105 [#104]: https://github.com/CLIUtils/CLI11/pull/104 +[#105]: https://github.com/CLIUtils/CLI11/issues/105 +[#106]: https://github.com/CLIUtils/CLI11/pull/106 ## Version 1.5: Optionals diff --git a/README.md b/README.md index 4fd12b51..b0532434 100644 --- a/README.md +++ b/README.md @@ -241,12 +241,16 @@ There are several options that are supported on the main app and subcommands. Th * `.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. * `.require_subcommand(min, max)`: Explicitly set min and max allowed subcommands. Setting `max` to 0 is unlimited. * `.add_subcommand(name, description="")` Add a subcommand, returns a pointer to the internally stored subcommand. -* `.got_subcommand(App_or_name)`: Check to see if a subcommand was received on the command line -* `.get_subcommands()`: The list of subcommands given on the command line -* `.get_parent()`: Get the parent App or nullptr if called on master App -* `.parsed()`: True if this subcommand was given on the command line +* `.got_subcommand(App_or_name)`: Check to see if a subcommand was received on the command line. +* `.get_subcommands()`: The list of subcommands given on the command line. +* `.get_parent()`: Get the parent App or nullptr if called on master App. +* `.get_options()`: Get the list of all defined option pointers (useful for processing the app for custom output formats). +* `.parse_order()`: Get the list of option pointers in the order they were parsed (including duplicates). +* `.get_description()`: Access the description. +* `.parsed()`: True if this subcommand was given on the command line. +* `.set_name(name)`: Add or change the name. * `.set_callback(void() function)`: Set the callback that runs at the end of parsing. The options have already run at this point. -* `.allow_extras()`: Do not throw an error if extra arguments are left over +* `.allow_extras()`: Do not throw an error if extra arguments are left over. * `.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. * `.set_footer(message)`: Set text to appear at the bottom of the help string. * `.set_failure_message(func)`: Set the failure message function. Two provided: `CLI::FailureMessage::help` and `CLI::FailureMessage::simple` (the default). diff --git a/include/CLI/Version.hpp b/include/CLI/Version.hpp index 009b3f87..0b4beef1 100644 --- a/include/CLI/Version.hpp +++ b/include/CLI/Version.hpp @@ -9,7 +9,7 @@ namespace CLI { #define CLI11_VERSION_MAJOR 1 #define CLI11_VERSION_MINOR 5 -#define CLI11_VERSION_PATCH 0 -#define CLI11_VERSION "1.5.0" +#define CLI11_VERSION_PATCH 1 +#define CLI11_VERSION "1.5.1" } // namespace CLI