Changelog History
Page 2
-
v1.7.1 Changes
January 30, 2019 -
v1.7.0 Changes
January 24, 2019๐ 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 withadd_mutable_set
.- ๐ Support Windows style options with
->allow_windows_style_options
. #187 On by default on Windows. #190 - โ Added
parse(string)
to split up and parse a command-line style string directly. #186 - โ Added
ignore_underscore
and related functions, to ignore underscores when matching names. #185 - 0๏ธโฃ The default INI Config will now add quotes to strings with spaces #195
- 0๏ธโฃ The default message now will mention the help-all flag also if present #197
- โ Added
->description
to set Option descriptions #199 - Mutating sets (introduced in Version 1.6) now have a clear add method,
add_mutable_set*
, since the set reference should not expire #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. #179 - ๐ Parsing is now done in phases:
shortcurcuits
,ini
,env
,callbacks
, andrequirements
; all subcommands complete a phase before moving on. #179 - ๐ Calling parse multiple times is now officially supported without
clear
(automatic). #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. #179 - โ
Use the standard
BUILD_TESTING
overCLI11_TESTING
if defined (CLI11_TESTING
may eventually be removed) #183 - โ Cleanup warnings #191
- Remove deprecated names:
set_footer
,set_name
,set_callback
, andset_type_name
. Use without theset_
instead. #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 featurefooter
,name
,callback
, andtype_name
must be used instead of theset_*
versions (deprecated previously).
- ๐ Support Windows style options with
-
v1.6.2 Changes
November 24, 2018๐ 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 #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. #156 - ๐ Fixed warning about local variable hiding class member with MSVC #157
- ๐ Fixed compile error with default settings on Clang 7 and libc++ #158
- ๐ Fixed special case of
--help
on subcommands (general fix planned for 1.7) #168 - Removing an option with links #179
- ๐ Fixed help-all formatting #163
-
v1.6.1 Changes
July 30, 2018๐ 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. -
v1.6.0 Changes
June 28, 2018โ Added a new formatting system #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
andformatter
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
toget_name(false, false)
(the default). - The old
get_name()
is nowget_name(false, true)
. - The old
get_pname()
is nowget_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. #121
๐ New for Config file reading and writing #121:
- Overridable, bidirectional Config.
- 0๏ธโฃ ConfigINI provided and used by default.
- ๐ Renamed ini to config in many places.
- Has
config_formatter()
andget_config_formatter()
. - Dropped prefix argument from
config_to_str
. - โ Added
ConfigItem
. - โ Added an example of a custom config format using nlohmann/json. #138
โฌ๏ธ Validators are now much more powerful #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
andINT in [1-4]
. - Validators can be combined with
&
and|
. - Old form simple validators are still accepted.
Other changes:
- ๐ Fixing
parse(args)
'sargs
setting and ordering after parse. #141 - Replaced
set_custom_option
withtype_name
andtype_size
instead ofset_custom_option
. Methods returnthis
. [#136] - Dropped
set_
on Option'stype_name
,default_str
, anddefault_val
. [#136] - Removed
set_
from App'sfailure_message
,footer
,callback
, andname
. [#136] - ๐ Fixed support
N<-1
fortype_size
. #140 - โ Added
->each()
to make adding custom callbacks easier. #126 - ๐ Allow empty options
add_option("-n",{})
to be edited later witheach
#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
, andempty
. #119 lname
andsname
have getters, addedconst get_parent
. #120- Using
add_set
will now capture L-values for sets, allowing further modification. #113 - Dropped duplicate way to run
get_type_name
(get_typeval
). - โ Removed
requires
in favor ofneeds
(deprecated in last version). #112 - Const added to argv. #126
โ Backend and testing changes:
- โ Added
-
v1.5.4 Changes
June 14, 2018This version fixes the optional search in the single file version; some macros were not yet defined when it did the search. You can define the
CLI11_*_OPTIONAL
macros to 0 if needed to eliminate the search. -
v1.5.3 Changes
April 19, 2018๐ This version fixes older AppleClang compilers by removing the optimization for casting. The minimum version of Boost Optional supported has been clarified to be 1.58. CUDA 7.0 NVCC is now supported.
-
v1.5.2 Changes
April 17, 2018๐ This is a quick patch release that makes LICENSE part of the single header file, making it easier to include. Minor cleanup from codacy. No significant code changes from 1.5.1.
-
v1.5.1 Changes
April 12, 2018๐ 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
andget_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
-
v1.5 Changes
๐ This version introduced support for optionals, along with clarification and examples of custom conversion overloads. Enums now have been dropped from the automatic conversion system, allowing explicit protection for out-of-range ints (or a completely custom conversion). This version has some internal cleanup and ๐ improved support for the newest compilers. Several bugs were fixed, as well.
๐ Note: This is the final release with
requires
, please switch toneeds
.- ๐ Fix unlimited short options eating two values before checking for positionals when no space present #90
- Symmetric exclude text when excluding options, exclude can be called multiple times #64
- ๐ Support for
std::optional
,std::experimental::optional
, andboost::optional
added if__has_include
is supported #95 - All macros/CMake variables now start with
CLI11_
instead of justCLI_
#95 - ๐ The internal stream was not being cleared before use in some cases. Fixed. #95
- Using an enum now requires explicit conversion overload #97
- ๐ The separator
--
now is removed when it ends unlimited arguments #100
Other, non-user facing changes:
- โ Added
Macros.hpp
with better C++ mode discovery #95 - ๐ Deprecated macros added for all platforms
- โ C++17 is now tested on supported platforms #95
- โ Informational printout now added to CTest #95
- ๐ Better single file generation #95
- โ Added support for GTest on MSVC 2017 (but not in C++17 mode, will need next version of GTest)
- Types now have a specific size, separate from the expected number - cleaner and more powerful internally #92
- โ Examples now run as part of testing #99