2018-01-31 04:49:31 +00:00
# Highlights
* Lazy propagation
* Lazy requirement validation
* `App::write_help` takes `&mut self` now
* `App::override_usage` No longer implies `\t` which allows multi lined usages
* In usage parser, for options `[name]... --option [val]` results in `ArgSettings::MultipleOccurrences` but `--option [val]...` results in `ArgSettings::MultipleValues` *and* `ArgSettings::MultipleOccurrences` . Before both resulted in the same thing
* Allow empty values no longer default
* UseValueDelimiter no longer the default
2018-03-21 19:04:46 +00:00
* Multiple delima fixed (vals vs occurrences)
2018-03-21 23:26:22 +00:00
* Ability to mutate args once they've been added to an `App`
* `App::args` and `App::arg` are more generic
2018-03-21 23:32:41 +00:00
* Can unset global settings
2018-03-21 19:04:46 +00:00
# How to Upgrade
### If you use `Arg::multiple(true)`
2018-01-31 04:49:31 +00:00
# Deprecations
## Simple Renames
2018-03-21 19:04:46 +00:00
### App
2018-01-31 04:49:31 +00:00
- `App::get_matches_safe` -> `App::try_get_matches`
- `App::get_matches_from_safe` -> `App::try_get_matches_from`
- `App::get_matches_safe_borrow` -> `App::try_get_matches_from_mut`
2018-03-21 19:04:46 +00:00
- `App::usage` -> `App::override_usage`
- `App::help` -> `App::override_help`
- `App::template` -> `App::help_template`
### Arg
2018-01-31 04:49:31 +00:00
- `Arg::unset` -> `Arg::unset_setting`
- `Arg::set` -> `Arg::setting`
2018-03-21 19:04:46 +00:00
## Structural Changes
2018-03-19 19:47:16 +00:00
2018-03-21 19:04:46 +00:00
### App
2018-01-31 04:49:31 +00:00
- `App::version_message` -> `App::mut_arg`
- `App::version_short` -> `App::mut_arg`
- `App::help_message` -> `App::mut_arg`
- `App::help_short` -> `App::mut_arg`
- `App::args_from_usage` -> `App::args(&str)`
2018-03-21 19:04:46 +00:00
- `App::arg_from_usage` -> `App::arg(&str)`
2018-01-31 04:49:31 +00:00
- `App::write_help` -> `&self` -> `&mut self` (#808)
- `App::gen_completions` -> `clap_completions::generate`
- `App::gen_completions_to` -> `clap_completions::generate_to`
2018-03-21 19:04:46 +00:00
- `App::settings` -> `App::setting(Setting1 | Setting2)`
- `App::unset_settings` -> `App::unset_setting(Setting1 | Setting2)`
- `App::global_settings` -> `App::global_setting(Setting1 | Setting2)`
### Arg
2018-01-31 04:49:31 +00:00
- `Arg::from_usage` -> `Arg::from(&str)`
2018-03-21 19:04:46 +00:00
# Additional APIs
## App
2018-03-21 23:26:22 +00:00
* `App::mut_arg`
2018-03-21 23:32:41 +00:00
* `App::unset_global_setting`
2018-03-21 23:26:22 +00:00
2018-03-21 19:04:46 +00:00
## Arg
2018-01-31 04:49:31 +00:00