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> for ArgGroup
      • App
      • App::write_version in favor of write!(w, App::render_version)
      • App::write_long_version in favor of write!(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 return std::io::Result
      • App::write_help & App::write_long_help now return std::io::Result
      • Error::info now is of type Vec<String> instead of Option<Vec<String>>
      • ArgMatches::subcommand now returns Option<(&str, &ArgMatches)>
      • short in #[clap()] now accepts char instead of &str

    ๐Ÿ”‹ Features

    • โž• Added support for subcommands that are flags (pacman style)
    • โž• Added Indices that is returned by ArgMatches::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 behind regex feature)
      • App
      • App::subcommand_placeholder
      • App::before_long_help
      • App::after_long_help
    • TODO: List App::get_* methods

    โœจ Enhancements

    • help_heading defined on Arg now has higher priority than App
    • 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