Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
imp(version flag): no longer generates a version unconditionally
This commit changes the default behavior of clap to no longer generate a `-V, --version` flag when no version information has been provided. Version information can be provided via `App::version`, `App::long_version`, or via `App::mut_arg("version", |_| ..)`. Using any of the above is the only way to have clap auto-generate the version flag. Technically, clap still generates a version flag, however it is removed prior to parsing if the user has not provided any version information via one of the mentioned methods. Relates to [#2812](#2812)
- Loading branch information
Showing
1 changed file
with
28 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters