clap-rs v3.0.0-beta.2 Release Notes
Release Date: 2020-09-18 // over 3 years ago-
๐ฅ BREAKING CHANGES
- โ Removed
From<&yaml_rust::yaml::Hash>
forArgGroup
- App
App::write_version
in favor ofwrite!(w, App::render_version)
App::write_long_version
in favor ofwrite!(w, App::render_long_version)
- Error
Error::cause
in favor of<Error as Display>::to_string
- Macros
_clap_count_exprs!
- ๐ Renamed Methods
- App
App::set_term_width
=>App::term_width
- Arg
Arg::from_yaml
=>Arg::from
Arg::with_name
=>Arg::new
Arg::required_if
=>Arg::required_if_eq
Arg::required_ifs
=>Arg::required_if_eq_any
Arg::required_unless
=>Arg::required_unless_present
Arg::required_unless_one
=>Arg::required_unless_present_any
Arg::required_unless_all
=>Arg::required_unless_present_all
- ArgGroup
ArgGroup::from_yaml
=>ArgGroup::from
ArgGroup::with_name
=>ArgGroup::new
- ๐ Renamed Variants
- ErrorKind
ErrorKind::HelpDisplayed
=>ErrorKind::DisplayHelp
ErrorKind::VersionDisplayed
=>ErrorKind::DisplayVersion
- ๐ Changed
App::print_help
&App::print_long_help
now returnstd::io::Result
App::write_help
&App::write_long_help
now returnstd::io::Result
Error::info
now is of typeVec<String>
instead ofOption<Vec<String>>
ArgMatches::subcommand
now returnsOption<(&str, &ArgMatches)>
short
in#[clap()]
now acceptschar
instead of&str
๐ Features
- โ Added support for subcommands that are flags (pacman style)
- โ Added
Indices
that is returned byArgMatches::indices_of
- โ Added
@global_setting
for app's macro builder - โ Added Methods
- Arg
Arg::default_missing_value
Arg::default_missing_value_os
Arg::default_missing_values
Arg::default_missing_values_os
Arg::short_alias
Arg::short_aliases
Arg::visible_short_alias
Arg::visible_short_aliases
Arg::value_hint
Arg::validator_regex
(gated behindregex
feature)- App
App::subcommand_placeholder
App::before_long_help
App::after_long_help
- TODO: List App::get_* methods
โจ Enhancements
help_heading
defined onArg
now has higher priority thanApp
- 0๏ธโฃ Limited default text wrapping to 100 when
wrap_help
feature is not enabled - ๐ Multiple bug fixes and error message improvements
- ๐ Size and Performance improvements
- โ Removed