updates clap and removes home rolled -h/--help distinction #438
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
DO NOT MERGE - until clap v2.23.1 is on crates.ioIt's safe to merge now.
Cargo.lock
This commit updates clap to v2.23.1
The update contained a bug fix in clap that results in broken code in
ripgrep. ripgrep was unknowingly relying on the bug, but this commit fixes that
issue. The bug centered around not being able to override the
auto-generated help message by supplying a flag with a long of
help
.Normally, supplying a flag with a long of
help
means whenever the userpasses
--help
, the consuming code (e.g. ripgrep) is responsible fordisplaying the help message. However, due to the bug in clap this wasn't
necessary for ripgrep to do unless the user passed
-h
. With the bugfixed, it meant the user passing
--help
and clap expected ripgrep todisplay the help, yet ripgrep expected clap to display the help. This
has been fixed in this commit of ripgrep.
All is well now!
v2.23.0 also brings the abilty to use
Arg::help
orArg::long_help
allowing one to distinguish between
-h
and--help
. This commitleaves all doc strings in the
lazy_static!
hashmap however only foraesthetic reasons.
This means all home rolled handling of
-h
/--help
has been removedfrom ripgrep, yet functionality and appearances are 100% the same.