v2.21.1 (2017-03-12)
Bug Fixes
- ArgRequiredElseHelp: fixes the precedence of this error to prioritize over other error messages (74b751ff, closes #895)
- Positionals: fixes some regression bugs resulting from old asserts in debug mode. (9a3bc98e, closes #896)
v2.21.0 (2017-03-09)
Performance
- doesn't run
arg_post_processing
on multiple values anymore (ec516182) - changes internal use of
VecMap
toVec
for matched values ofArg
s (22bf137a) - vastly reduces the amount of cloning when adding non-global args minus when they're added from
App::args
which is forced to clone (8da0303b) - refactor to remove unneeded vectors and allocations and checks for significant performance increases (0efa4119)
Documentation
- Fix examples link in CONTRIBUTING.md (60cf875d)
Improvements
- when
AppSettings::SubcommandsNegateReqs
andArgsNegateSubcommands
are used, a new more accurate double line usage string is shown (50f02300, closes #871)
API Additions
- Arg::last: adds the ability to mark a positional argument as 'last' which means it should be used with
--
syntax and can be accessed early (6a7aea90, closes #888) - provides
default_value_os
anddefault_value_if[s]_os
(0f2a3782, closes #849) - provides
App::help_message
andApp::version_message
which allows one to override the auto-generated help/version flag associated help (389c413, closes #889)
New Settings
- InferSubcommands: adds a setting to allow one to infer shortened subcommands or aliases (i.e. for subcommmand "test", "t", "te", or "tes" would be allowed assuming no other ambiguities) (11602032, closes #863)
Bug Fixes
- doesn't print the argument sections in the help message if all args in that section are hidden (ce5ee5f5)
- doesn't include the various [ARGS] [FLAGS] or [OPTIONS] if the only ones available are hidden (7b4000af, closes #882)
- now correctly shows subcommand as required in the usage string when AppSettings::SubcommandRequiredElseHelp is used (8f0884c1)
- fixes some memory leaks when an error is detected and clap exits (8c2dd287)
- fixes a trait that's marked private accidentlly, but should be crate internal public (1ae21108)
- Completions: fixes a bug that tried to propogate global args multiple times when generating multiple completion scripts (5e9b9cf4, closes #846)