CLI11 v1.3 Release Notes

  • ๐Ÿ”จ This version focused on refactoring several key systems to ensure correct behavior in the interaction of different settings. Most caveats about features only working on the main App have been addressed, and extra arguments have been ๐Ÿ”ง reworked. Inheritance of defaults makes configuring CLI11 much easier without having to subclass. Policies add new ways to handle multiple arguments to match ๐Ÿ‘ your favorite CLI programs. Error messages and help messages are better and more ๐Ÿ“œ flexible. Several bugs and odd behaviors in the parser have been fixed.

    • ๐Ÿ”– Added a version macro, CLI11_VERSION, along with *_MAJOR, *_MINOR, and *_PATCH, for programmatic access to the version.
    • 0๏ธโƒฃ Reworked the way defaults are set and inherited; explicit control given to user with ->option_defaults() #48
    • Hidden options now are based on an empty group name, instead of special "hidden" keyword #48
    • ๐Ÿ“œ parse no longer returns (so CLI11_PARSE is always usable) #37
    • โž• Added remaining() and remaining_size() #37
    • allow_extras and prefix_command are now valid on subcommands #37
    • โž• Added take_last to only take last value passed #40
    • Added multi_option_policy and shortcuts to provide more control than just a take last policy #59
    • More detailed error messages in a few cases #41
    • Footers can be added to help #42
    • Help flags are easier to customize #43
    • ๐Ÿ‘ Subcommand now support groups #46
    • CLI::RuntimeError added, for easy exit with error codes #45
    • The clang-format script is now no longer "hidden" #48
    • The order is now preserved for subcommands (list and callbacks) #49
    • โœ… Tests now run individually, utilizing CMake 3.10 additions if possible #50
    • 0๏ธโƒฃ Failure messages are now customizable, with a shorter default #52
    • Some improvements to error codes #53
    • require_subcommand now offers a two-argument form and negative values on the one-argument form are more useful #51
    • Subcommands no longer match after the max required number is obtained #51
    • Unlimited options no longer prioritize over remaining/unlimited positionals #51
    • โž• Added ->transform which modifies the string parsed #54
    • ๐Ÿ”„ Changed of API in validators to void(std::string &) (const for users), throwing providing nicer errors #54
    • โž• Added CLI::ArgumentMismatch #56 and fixed missing failure if one arg expected #55
    • ๐Ÿ‘Œ Support for minimum unlimited expected arguments #56
    • ๐Ÿ“œ Single internal arg parse function #56
    • ๐Ÿ‘ Allow options to be disabled from INI file, rename add_config to set_config #60

    Converting from CLI11 1.2

    ๐Ÿ“œ > - app.parse no longer returns a vector. Instead, use app.remaining(true).

    • "hidden" is no longer a special group name, instead use ""
    • Validators API has changed to return an error string; use .empty() to get the old bool back
    • Use .set_help_flag instead of accessing the help pointer directly ๐Ÿšš > (discouraged, but not removed yet)
    • add_config has been renamed to set_config
    • Errors thrown in some cases are slightly more specific