Skip to content

Commit 16cf924

Browse files
committed
docs(README.md): updates for new features
1 parent 754d6b7 commit 16cf924

File tree

1 file changed

+21
-8
lines changed

1 file changed

+21
-8
lines changed

README.md

+21-8
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@ It is a simple to use, efficient, and full featured library for parsing command
88

99
## What's New
1010

11-
If you're already familiar with `clap` but just want to see some new highlights as of **1.2.0**
11+
If you're already familiar with `clap` but just want to see some new highlights as of **1.2.1**
1212

13-
* Custom validations are now supported! You can define a function to validate argument values, or fail parsing with a custom error message. Meaning your application logic can focus soley on *using* values.
14-
* Improved ergonomics - Some `App` methods have been deprecated (won't be removed until 2.x) to support a more ergonomic `.setting()` method which takes an `AppSettings` enum value. This makes it easier to find `App` settings (just view all variants of the enum). (Thanks to [Vinatorul](https://github.com/Vinatorul)!)
13+
* **Performance Improvements**
14+
* **POSIX Compatible Conflicts** are not supported! In POSIX args can be conflicting, but not fail parsing because whichever arg comes *last* "wins" to to speak. This allows things such as aliases (i.e. `alias ls='ls -l'` but then using `ls -C` in your terminal which ends up passing `ls -l -C` as the final arguments. Since `-l` and `-C` aren't compatible, this effectively runs `ls -C`). (Thanks to [Vinatorul](https://github.com/Vinatorul)!)
15+
* **Custom validations** are now supported! You can define a function to validate argument values, or fail parsing with a custom error message. Meaning your application logic can focus soley on *using* values.
16+
* **Improved ergonomics** - Some `App` methods have been deprecated (won't be removed until 2.x) to support a more ergonomic `.setting()` method which takes an `AppSettings` enum value. This makes it easier to find `App` settings (just view all variants of the enum). (Thanks to [Vinatorul](https://github.com/Vinatorul)!)
1517

1618
For full details see the [changelog](https://github.com/kbknapp/clap-rs/blob/master/CHANGELOG.md)
1719

@@ -64,6 +66,7 @@ Below are a few of the features which `clap` supports, full descriptions and usa
6466
* **Colorized (Red) Errors (Non Windows OS only)**: Error message are printed in red text (this feature can optionally be disabled, see 'Optional Dependencies / Features').
6567
* **Global Arguments**: Arguments can optionally be defined once, and be available to all child subcommands.
6668
* **Custom Validations**: You can define a function to use as a validator of argument values. Imagine defining a function to validate IP addresses, or fail parsing upon error. This means your application logic can be soley focused on *using* values.
69+
* **POSIX Compatible Conflicts** - In POSIX args can be conflicting, but not fail parsing because whichever arg comes *last* "wins" to to speak. This allows things such as aliases (i.e. `alias ls='ls -l'` but then using `ls -C` in your terminal which ends up passing `ls -l -C` as the final arguments. Since `-l` and `-C` aren't compatible, this effectively runs `ls -C` in `clap` if you choose...`clap` also supports hard conflicts that fail parsing). (Thanks to [Vinatorul](https://github.com/Vinatorul)!)
6770

6871
## Quick Example
6972

@@ -395,10 +398,20 @@ Although I do my best to keep breaking changes to a minimum, being that this a s
395398

396399
Old method names will be left around for some time.
397400

401+
* As of 1.2.0 (Will **not** be removed until 2.x)
402+
- `App::subcommands_negate_reqs(bool)` -> `AppSettings::SubcommandsNegateReqs` passed to `App::setting()`
403+
- `App::subcommand_required(bool)` -> `AppSettings::SubcommandRequired` passed to `App::setting()`
404+
- `App::arg_required_else_help(bool)` -> `AppSettings::ArgRequiredElseHelp` passed to `App::setting()`
405+
- `App::global_version(bool)` -> `AppSettings::GlobalVersion` passed to `App::setting()`
406+
- `App::versionless_subcommands(bool)` -> `AppSettings::VersionlessSubcommands` passed to `App::setting()`
407+
- `App::unified_help_messages(bool)` -> `AppSettings::UnifiedHelpMessages` passed to `App::setting()`
408+
- `App::wait_on_error(bool)` -> `AppSettings::WaitOnError` passed to `App::setting()`
409+
- `App::subcommand_required_else_help(bool)` -> `AppSettings::SubcommandRequiredElseHelp` passed to `App::setting()`
410+
398411
* As of 0.10.0
399-
- `SubCommand::new()` -> `SubCommand::with_name()`
400-
- `App::error_on_no_subcommand()` -> `App::subcommand_required()`
412+
- `SubCommand::new()` -> `SubCommand::with_name()` (Removed as of 1.0.0)
413+
- `App::error_on_no_subcommand()` -> `App::subcommand_required()` (Removed as of 1.0.0)
401414
* As of 0.6.8
402-
- `Arg::new()` -> `Arg::with_name()`
403-
- `Arg::mutually_excludes()` -> `Arg::conflicts_with()`
404-
- `Arg::mutually_excludes_all()` -> `Arg::conflicts_with_all()`
415+
- `Arg::new()` -> `Arg::with_name()` (Removed as of 1.0.0)
416+
- `Arg::mutually_excludes()` -> `Arg::conflicts_with()` (Removed as of 1.0.0)
417+
- `Arg::mutually_excludes_all()` -> `Arg::conflicts_with_all()` (Removed as of 1.0.0)

0 commit comments

Comments
 (0)