github clap-rs/clap v2.0.0
clap 2.0 release!

latest releases: clap_complete-v4.5.2, v4.5.4, v4.5.3...
8 years ago

v2.0.0 (2016-01-28)

Improvements

  • From Usage: vastly improves the usage parser (fa3a2f86, closes #350)

Features

  • adds support for external subcommands (177fe5cc, closes #372)
  • adds support values with a leading hyphen (e4d429b9, closes #385)
  • adds support for turning off the value delimiter (508db850, closes #352)
  • adds support changing the value delimiter (dafeae8a, closes #353)
  • adds support for comma separated values (e69da6af, closes #348)
  • adds support with options with optional values (4555736c, closes #367)
  • UTF-8: adds support for invalid utf8 in values (c5c59dec, closes #269)
  • v2: implementing the base of 2.x (a3536054)

Bug Fixes

  • fixes nightly build with new lints (17599195)
  • fixes Windows build for 2x release (674c9b48, closes #392)
  • fixes yaml build for 2x base (adceae64)

Documentation

  • updates examples for 2x release (1303b360, closes #394)
  • updates examples for 2x release (0a011f31, closes #394)
  • updates documentation for v2 release (8d51724e)
  • updating docs for 2x release (576d0e0e)
  • README.md:
    • updates readme for v2 release (acaba01a, closes #393)
    • fix typo and make documentation conspicuous (07b9f614)

BREAKING CHANGES

  • Fewer liftimes! Yay!
    • App<'a, 'b, 'c, 'd, 'e, 'f> => App<'a, 'b>
    • Arg<'a, 'b, 'c, 'd, 'e, 'f> => Arg<'a, 'b>
    • ArgMatches<'a, 'b> => ArgMatches<'a>
  • Simply Renamed
    • App::arg_group => App::group
    • App::arg_groups => App::groups
    • ArgGroup::add => ArgGroup::arg
    • ArgGroup::add_all => ArgGroup::args
    • ClapError => Error
    • struct field ClapError::error_type => Error::kind
    • ClapResult => Result
    • ClapErrorType => ErrorKind
  • Removed Deprecated Functions and Methods
    • App::subcommands_negate_reqs
    • App::subcommand_required
    • App::arg_required_else_help
    • App::global_version(bool)
    • App::versionless_subcommands
    • App::unified_help_messages
    • App::wait_on_error
    • App::subcommand_required_else_help
    • SubCommand::new
    • App::error_on_no_subcommand
    • Arg::new
    • Arg::mutually_excludes
    • Arg::mutually_excludes_all
    • Arg::mutually_overrides_with
    • simple_enum!
  • Renamed Error Variants
    • InvalidUnicode => InvalidUtf8
    • InvalidArgument => UnknownArgument
  • Usage Parser
    • Value names can now be specified inline, i.e. -o, --option <FILE> <FILE2> 'some option which takes two files'
    • There is now a priority of order to determine the name - This is perhaps the biggest breaking change. See the documentation for full details. Prior to this change, the value name took precedence. Ensure your args are using the proper names (i.e. typically the long or short and NOT the value name) throughout the code
  • ArgMatches::values_of returns an Values now which implements Iterator (should not break any code)
  • crate_version! returns &'static str instead of String

Don't miss a new clap release

NewReleases is sending notifications on new releases.