From 06e07ad8e6aadde6d76c41be6250051e01682912 Mon Sep 17 00:00:00 2001 From: Kevin K Date: Thu, 9 Mar 2017 17:13:52 -0500 Subject: [PATCH] docs(README.md): removes the old updates from previous versions as it's getting very long and hard to read --- README.md | 122 ------------------------------------------------------ 1 file changed, 122 deletions(-) diff --git a/README.md b/README.md index 23aadb3b..6bb52190 100644 --- a/README.md +++ b/README.md @@ -62,128 +62,6 @@ Here's the highlights for v2.21.0 * Fixes a critical bug in the `clap_app!` macro of a missing fragment specifier when using `!property` style tags. * Fix examples link in CONTRIBUTING.md - -Here's the highlights from v2.0.0 to v2.20.4 - -* Fixes a bug that tried to propogate global args multiple times when generating multiple completion scripts -* Fix examples link in CONTRIBUTING.md -* **Completions**: fixes bash completions for commands that have an underscore in the name -* **Completions**: fixes a bug where ZSH completions would panic if the binary name had an underscore in it -* allow final word to be wrapped in wrap_help -* **Completions**: fixes a bug where global args weren't included in the generated completion scripts -* **Macros Documentation:** adds a warning about changing values in Cargo.toml not triggering a rebuild automatically -* Fixes a critical bug where subcommand settings were being propogated too far -* Adds ArgGroup::multiple to the supported YAML fields for building ArgGroups from YAML -* Fixes a bug where the final word wasn't wrapped in help messages -* Fixes finding required arguments in group arguments -* **ArgsNegateSubcommands:** disables args being allowed between subcommands -* **DontCollapseArgsInUsage:** disables the collapsing of positional args into `[ARGS]` in the usage string -* **DisableHelpSubcommand:** disables building the `help` subcommand -* **AllowMissingPositional:** allows one to implement `$ prog [optional] ` style CLIs where the second postional argument is required, but the first is optional -* **PropagateGlobalValuesDown:** automatically propagats global arg's values down through *used* subcommands -* **Arg::value_terminator:** adds the ability to terminate multiple values with a given string or char -* **Arg::default_value_if[s]:** adds new methods for *conditional* default values (such as a particular value from another argument was used) -* **Arg::requires_if[s]:** adds the ability to *conditionally* require additional args (such as if a particular value was used) -* **Arg::required_if[s]:** adds the ability for an arg to be *conditionally* required (i.e. "arg X is only required if arg Y was used with value Z") -* **Arg::validator_os:** adds ability to validate values which may contain invalid UTF-8 -* **crate_description!:** Uses the `Cargo.toml` description field to fill in the `App::about` method at compile time -* **crate_name!:** Uses the `Cargo.toml` name field to fill in the `App::new` method at compile time -* **app_from_crate!:** Combines `crate_version!`, `crate_name!`, `crate_description!`, and `crate_authors!` into a single macro call to build a default `App` instance from the `Cargo.toml` fields -* **no_cargo:** adds a `no_cargo` feature to disable Cargo-env-var-dependent macros for those *not* using `cargo` to build their crates -* **Options:** fixes a critical bug where options weren't forced to have a value -* fixes a bug where calling the help of a subcommand wasn't ignoring required args of parent commands -* **Help Subcommand:** fixes a bug where the help subcommand couldn't be overriden -* **Low Index Multiples:** fixes a bug which caused combinations of LowIndexMultiples and `Arg::allow_hyphen_values` to fail parsing -* **Default Values:** improves the error message when default values are involved -* **YAML:** adds conditional requirements and conditional default values to YAML -* Support `--("some-arg-name")` syntax for defining long arg names when using `clap_app!` macro -* Support `("some app name")` syntax for defining app names when using `clap_app!` macro -* **Help Wrapping:** long app names (with spaces), authors, and descriptions are now wrapped appropriately -* **Conditional Default Values:** fixes the failing doc tests of Arg::default_value_ifs -* **Conditional Requirements:** adds docs for Arg::requires_ifs -* Fixes a bug where calling the help of a subcommand wasn't ignoring required args of parent commands -* Fixes a bug by escaping square brackets in ZSH completions which were causing conflicts and errors. -* **Bash Completion:** allows bash completion to fall back to traidtional bash completion upon no matching completing function -* **Arg Setting**: Allows specifying an `AllowLeadingHyphen` style setting for values only for specific args, vice command wide -* **Validators:** improves the error messages for validators -* **Required Unless:** fixes a bug where having required_unless set doesn't work when conflicts are also set -* **ZSH Completions:** fixes an issue where zsh completions caused panics if there were no subcommands -* **Completions:** Adds completion support for Microsoft PowerShell! (Thanks to @Arnavion) -* Allows specifying the second to last positional argument as `multiple(true)` (i.e. things such as `mv ... `) -* Adds an `App::get_name` and `App::get_bin_name` -* Conflicting argument errors are now symetrical, meaning more consistent and better usage suggestions -* **Completions:** adds automatic ZSH completion script generation support! :tada: :tada: -* **AppSettings:** adds new setting `AppSettings::AllowNegativeNumbers` which functions like `AllowLeadingHyphen` except only allows undefined negative numbers to pass parsing. -* Stabilize `clap_app!` macro (i.e. no longer need to use `unstable` feature) -* Deprecate `App::with_defaults` -* One can now alias arguments either visibly (which appears in the help text) or invisibly just like subcommands! -* The `from_usage` parser now correctly handles non-ascii names / options and help! -* **Value Delimiters:** fixes the confusion around implicitly setting value delimiters. (The default is to *not* use a delimiter unless explicitly set) -* Changes the default value delimiter rules (i.e. the default is `use_delimiter(false)` *unless* a setting/method that implies multiple values was used) **[Bugfix that *may* "break" code]** - * If code breaks, simply add `Arg::use_delimiter(true)` to the affected args -* Adds ability to hide the possible values from the help text on a per argument basis, instead of command wide -* Allows for limiting detected terminal width (i.e. wrap at `x` length, unless the terminal width is *smaller*) -* `clap` now ignores hard newlines in help messages and properly re-aligns text, but still wraps if the term width is too small -* Adds support for the setting `Arg::require_delimiter` from YAML -* `clap` no longer requires one to use `{n}` inside help text to insert a newline that is properly aligned. One can now use the normal `\n`. -* `clap` now ignores hard newlines in help messages and properly re-aligns text, but still wraps if the term width is too small -* Errors can now have custom description -* Uses `term_size` instead of home-grown solution on Windows -* Adds the ability to wrap help text intelligently on Windows! -* Moves docs to [docs.rs!](https://docs.rs/clap/)! -* Automatically moves help text to the next line and wraps when term width is determined to be too small, or help text is too long -* Vastly improves *development* error messages when using YAML -* Adds a shorthand way to ignore help text wrapping and use source formatting (i.e. `App::set_term_width(0)`) -* **Help Subcommand:** fixes misleading usage string when using multi-level subcommmands such as `myprog help subcmd1 subcmd2` -* **YAML:** allows using lists or single values with certain arg declarations for increased ergonomics -* **Fish Shell Completions:** one can generate a basic fish completions script at compile time! -* Adds the ability to generate completions to an `io::Write` object -* Adds an `App::unset_setting` and `App::unset_settings` -* **Completions:** one can now [generate a bash completions](https://docs.rs/clap/2.9.0/clap/struct.App.html#method.gen_completions) script at compile time! These completions work with options using [possible values](https://docs.rs/clap/2.9.0/clap/struct.Arg.html#method.possible_values), [subcommand aliases](https://docs.rs/clap/2.9.0/clap/struct.App.html#method.aliases), and even multiple levels of subcommands -* **Arg:** adds new optional setting [`Arg::require_delimiter`](https://docs.rs/clap/2.8.0/clap/struct.Arg.html#method.require_delimiter) which requires val delimiter to parse multiple values -* The terminal sizing portion has been factored out into a separate crate, [term_size](https://crates.io/crates/term_size) -* Options using multiple values and delimiters no longer parse additional values after a trailing space (i.e. `prog -o 1,2 file.txt` parses as `1,2` for `-o` and `file.txt` for a positional arg) -* Using options using multiple values and with an `=` no longer parse args after the trailing space as values (i.e. `prog -o=1 file.txt` parses as `1` for `-o` and `file.txt` for a positional arg) -* **Usage Strings:** `[FLAGS]` and `[ARGS]` are no longer blindly added to usage strings, instead only when applicable -* `arg_enum!`: allows using more than one meta item, or things like `#[repr(C)]` with `arg_enum!`s -* `App::print_help`: now prints the same as would have been printed by `--help` or the like -* Prevents invoking ` help help` and displaying incorrect help message -* Subcommand help messages requested via ` help ` now correctly match ` --help` -* One can now specify groups which require AT LEAST one of the args -* Allows adding multiple ArgGroups per Arg -* **Global Settings:** One can now set an `AppSetting` which is propogated down through child subcommands -* **Terminal Wrapping:** Allows wrapping at specified term width (Even on Windows!) (can now set an absolute width to "smart" wrap at) -* **SubCommands/Aliases:** adds support for visible aliases for subcommands (i.e. aliases that are dipslayed in the help message) -* **Subcommands/Aliases:** when viewing the help of an alias, it now display help of the aliased subcommand -* Adds new setting to stop delimiting values with `--` or `AppSettings::TrailingVarArg` -* Subcommands now support aliases - think of them as hidden subcommands that dispatch to said subcommand automatically -* Fixed times when `ArgGroup`s are duplicated in usage strings -* **Before Help:** adds support for displaying info before help message -* **Required Unless:** adds support for allowing args that are required unless certain other args are present -* **New Help Template Engine!**: Now you have full control over the layout of your help message. Major thanks to @hgrecco -* **Pull crate Authors from Cargo.toml**: One can now use the `crate_authors!` macro to automatically pull the crate authors from their Cargo.toml file -* **Colored Help Messages**: Help messages can now be optionally colored (See the `AppSettings::ColoredHelp` setting). Screenshot below. -* **Help text auto wraps and aligns at for subcommands too!** - Long help strings of subcommands will now properly wrap and align to term width on Linux and OS X. This can be turned off as well. -* **Help text auto wraps and aligns at term width!** - Long help strings will now properly wrap and align to term width on Linux and OS X (and presumably Unix too). This can be turned off as well. -* **Can customize the order of opts, flags, and subcommands in help messages** - Instead of using the default alphabetical order, you can now re-arrange the order of your args and subcommands in help message. This helps to emphasize more popular or important options. -* **Can auto-derive the order from declaration order** - Have a bunch of args or subcommmands to re-order? You can now just derive the order from the declaration order! -* **Help subcommand now accepts other subcommands as arguments!** - Similar to other CLI precedents, the `help` subcommand can now accept other subcommands as arguments to display their help message. i.e. `$ myprog help mysubcmd` (*Note* these can even be nested heavily such as `$ myprog help subcmd1 subcmd2 subcmd3` etc.) -* **Default Values**: Args can now specify default values -* **Next Line Help**: Args can have help strings on the line following the argument (useful for long arguments, or those with many values). This can be set command-wide or for individual args - -Here's a gif of them in action! - -![zsh-comppletions](http://i.imgur.com/rwlMbAv.gif) - -An example of the help text wrapping at term width: - -![screenshot](http://i.imgur.com/PAJzJJG.png) - -An example of the optional colored help: - -![screenshot](http://i.imgur.com/7fs2h5j.png) - - For full details, see [CHANGELOG.md](https://github.com/kbknapp/clap-rs/blob/master/CHANGELOG.md) ## About