Tags: cbachhuber/CLI11
Tags
Version 1.8 (CLIUtils#280) * Version bump * Update README * Apply suggestions from code review Co-Authored-By: Philip Top <[email protected]> * Adding mark for deprecated items
Version 1.7.1: Quick patch This version provides a quick patch for a (correct) warning from GCC 8 for the windows options code. * Fix for Windows style option parsing [CLIUtils#201] * Improve `add_subcommand` when throwing an exception [CLIUtils#204] * Better metadata for Conan package [CLIUtils#202] [CLIUtils#201]: CLIUtils#201 [CLIUtils#202]: CLIUtils#202 [CLIUtils#204]: CLIUtils#204
Version 1.7: Parse breakup The parsing procedure now maps much more sensibly to complex, nested subcommand structures. Each phase of the parsing happens on all subcommands before moving on with the next phase of the parse. This allows several features, like required environment variables, to work properly even through subcommand boundaries. Passing the same subcommand multiple times is better supported. Several new features were added as well, including Windows style option support, parsing strings directly, and ignoring underscores in names. Adding a set that you plan to change later must now be done with `add_mutable_set`. * Support Windows style options with `->allow_windows_style_options`. [CLIUtils#187] On by default on Windows. [CLIUtils#190] * Added `parse(string)` to split up and parse a command-line style string directly. [CLIUtils#186] * Added `ignore_underscore` and related functions, to ignore underscores when matching names. [CLIUtils#185] * The default INI Config will now add quotes to strings with spaces [CLIUtils#195] * The default message now will mention the help-all flag also if present [CLIUtils#197] * Added `->description` to set Option descriptions [CLIUtils#199] * Mutating sets (introduced in Version 1.6) now have a clear add method, `add_mutable_set*`, since the set reference should not expire [CLIUtils#200] * Subcommands now track how many times they were parsed in a parsing process. `count()` with no arguments will return the number of times a subcommand was encountered. [CLIUtils#179] * Parsing is now done in phases: `shortcurcuits`, `ini`, `env`, `callbacks`, and `requirements`; all subcommands complete a phase before moving on. [CLIUtils#179] * Calling parse multiple times is now officially supported without `clear` (automatic). [CLIUtils#179] * Dropped the mostly undocumented `short_circuit` property, as help flag parsing is a bit more complex, and the default callback behavior of options now works properly. [CLIUtils#179] * Use the standard `BUILD_TESTING` over `CLI11_TESTING` if defined (`CLI11_TESTING` may eventually be removed) [CLIUtils#183] * Cleanup warnings [CLIUtils#191] * Remove deprecated names: `set_footer`, `set_name`, `set_callback`, and `set_type_name`. Use without the `set_` instead. [CLIUtils#192] > ### Converting from CLI11 1.6: > > * `->short_circuit()` is no longer needed, just remove it if you were using it - raising an exception will happen in the proper place now without it. > * `->add_set*` becomes `->add_mutable_set*` if you were using the editable set feature > * `footer`, `name`, `callback`, and `type_name` must be used instead of the `set_*` versions (deprecated previously). [CLIUtils#179]: CLIUtils#179 [CLIUtils#183]: CLIUtils#183 [CLIUtils#185]: CLIUtils#185 [CLIUtils#186]: CLIUtils#186 [CLIUtils#187]: CLIUtils#187 [CLIUtils#190]: CLIUtils#190 [CLIUtils#191]: CLIUtils#191 [CLIUtils#192]: CLIUtils#192 [CLIUtils#197]: CLIUtils#197 [CLIUtils#195]: CLIUtils#195 [CLIUtils#199]: CLIUtils#199 [CLIUtils#200]: CLIUtils#200
Version 1.6.2: Help-all This version fixes some formatting bugs with help-all. It also adds fixes for several warnings, including an experimental optional error on Clang 7. Several smaller fixes. * Fixed help-all formatting [CLIUtils#163] * Printing help-all on nested command now fixed (App) * Missing space after help-all restored (Default formatter) * More detail printed on help all (Default formatter) * Help-all subcommands get indented with inner blank lines removed (Default formatter) * `detail::find_and_replace` added to utilities * Fixed CMake install as subproject with `CLI11_INSTALL` flag. [CLIUtils#156] * Fixed warning about local variable hiding class member with MSVC [CLIUtils#157] * Fixed compile error with default settings on Clang 7 and libc++ [CLIUtils#158] * Fixed special case of `--help` on subcommands (general fix planned for 1.7) [CLIUtils#168] * Removing an option with links [CLIUtils#179] [CLIUtils#156]: CLIUtils#156 [CLIUtils#157]: CLIUtils#157 [CLIUtils#158]: CLIUtils#158 [CLIUtils#163]: CLIUtils#163 [CLIUtils#168]: CLIUtils#168 [CLIUtils#179]: CLIUtils#179
Version 1.6.1: Platform fixes This version provides a few fixes for special cases, such as mixing with `Windows.h` and better defaults for systems like Hunter. The one new feature is the ability to produce "branded" single file output for providing custom namespaces or custom macro names. * Added fix and test for including Windows.h [CLIUtils#145] * No longer build single file by default if main project, supports systems stuck on Python 2.6 [CLIUtils#149], [CLIUtils#151] * Branding support for single file output [CLIUtils#150] [CLIUtils#145]: CLIUtils#145 [CLIUtils#149]: CLIUtils#149 [CLIUtils#150]: CLIUtils#150 [CLIUtils#151]: CLIUtils#151
Version 1.6: Formatting help Added a new formatting system [CLIUtils#109]. You can now set the formatter on Apps. This has also simplified the internals of Apps and Options a bit by separating most formatting code. * Added `CLI::Formatter` and `formatter` slot for apps, inherited. * `FormatterBase` is the minimum required. * `FormatterLambda` provides for the easy addition of an arbitrary function. * Added `help_all` support (not added by default). Changes to the help system (most normal users will not notice this): * Renamed `single_name` to `get_name(false, false)` (the default). * The old `get_name()` is now `get_name(false, true)`. * The old `get_pname()` is now `get_name(true, false)`. * Removed `help_*` functions. * Protected function `_has_help_positional` removed. * `format_help` can now be chained. * Added getters for the missing parts of options (help no longer uses any private parts). * Help flags now use new `short_circuit` property to simplify parsing. [CLIUtils#121] New for Config file reading and writing [CLIUtils#121]: * Overridable, bidirectional Config. * ConfigINI provided and used by default. * Renamed ini to config in many places. * Has `config_formatter()` and `get_config_formatter()`. * Dropped prefix argument from `config_to_str`. * Added `ConfigItem`. * Added an example of a custom config format using [nlohmann/json]. [CLIUtils#138] Validators are now much more powerful [CLIUtils#118], all built in validators upgraded to the new form: * A subclass of `CLI::Validator` is now also accepted. * They now can set the type name to things like `PATH` and `INT in [1-4]`. * Validators can be combined with `&` and `|`. * Old form simple validators are still accepted. Other changes: * Fixing `parse(args)`'s `args` setting and ordering after parse. [CLIUtils#141] * Replaced `set_custom_option` with `type_name` and `type_size` instead of `set_custom_option`. Methods return `this`. [CLIUtils#136] * Dropped `set_` on Option's `type_name`, `default_str`, and `default_val`. [CLIUtils#136] * Removed `set_` from App's `failure_message`, `footer`, `callback`, and `name`. [CLIUtils#136] * Fixed support `N<-1` for `type_size`. [CLIUtils#140] * Added `->each()` to make adding custom callbacks easier. [CLIUtils#126] * Allow empty options `add_option("-n",{})` to be edited later with `each` [CLIUtils#142] * Added filter argument to `get_subcommands`, `get_options`; use empty filter `{}` to avoid filtering. * Added `get_groups()` to get groups. * Better support for manual options with `get_option`, `set_results`, and `empty`. [CLIUtils#119] * `lname` and `sname` have getters, added `const get_parent`. [CLIUtils#120] * Using `add_set` will now capture L-values for sets, allowing further modification. [CLIUtils#113] * Dropped duplicate way to run `get_type_name` (`get_typeval`). * Removed `requires` in favor of `needs` (deprecated in last version). [CLIUtils#112] * Const added to argv. [CLIUtils#126] Backend and testing changes: * Internally, `type_name` is now a lambda function; for sets, this reads the set live. [CLIUtils#116] * Cleaner tests without `app.reset()` (and `reset` is now `clear`). [CLIUtils#141] * Better CMake policy handling. [CLIUtils#110] * Includes are properly sorted. [CLIUtils#120] * Testing (only) now uses submodules. [CLIUtils#111] [CLIUtils#109]: CLIUtils#109 [CLIUtils#110]: CLIUtils#110 [CLIUtils#111]: CLIUtils#111 [CLIUtils#112]: CLIUtils#112 [CLIUtils#113]: CLIUtils#113 [CLIUtils#116]: CLIUtils#116 [CLIUtils#118]: CLIUtils#118 [CLIUtils#119]: CLIUtils#119 [CLIUtils#120]: CLIUtils#120 [CLIUtils#121]: CLIUtils#121 [CLIUtils#126]: CLIUtils#126 [CLIUtils#127]: CLIUtils#127 [CLIUtils#138]: CLIUtils#138 [CLIUtils#140]: CLIUtils#140 [CLIUtils#141]: CLIUtils#141 [CLIUtils#142]: CLIUtils#142 [nlohmann/json]: https://github.com/nlohmann/json
Version 1.5.1: Access 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 [CLIUtils#102] * Add missing getters `get_options` and `get_description` to App [CLIUtils#105] * The app name now can be set, and will override the auto name if present [CLIUtils#105] * Add `(REQUIRED)` for required options [CLIUtils#104] * Print simple name for Needs/Excludes [CLIUtils#104] * Use Needs instead of Requires in help print [CLIUtils#104] * Groups now are listed in the original definition order [CLIUtils#106] [CLIUtils#102]: CLIUtils#102 [CLIUtils#104]: CLIUtils#104 [CLIUtils#105]: CLIUtils#105 [CLIUtils#106]: CLIUtils#106
PreviousNext