gn /
gn /
75c052e3167a80d1d2bc2f2e521c7012bba2e4ca Add spell-checking to `gn help`.
I tried porting a gyp copies step to gn, and one of the things I tried while
doing so whas `gn help copies`. If help had spell-checking, it would've
suggested `gn help copy`. Since that seems like a nice change, add this.
Also stop printing full help output when a topic is not found, because then
the "not found" error scrolls by so fast that I never see it.
Demo:
$ out/gn/gn help copyasdfasdf
ERROR No help on "copyasdfasdf".
Run `gn help` for a list of available topics.
$ out/gn/gn help copies
ERROR No help on "copies".
Did you mean `gn help copy`?
(There's another implementation of EditDistance() in
components/ssl/error_classification.cc -- but that works based on strings
not StringPieces and it doesn't have a "max_distance" parameter.
Since there's only one other instance of this function, just having a second version
of it seems preferrable over finding some place to put this function so it can be used
from both places. I'm however improving the other copy a bit in
https://codereview.chromium.org/1690593002/)
BUG=none
Review URL: https://codereview.chromium.org/1681363003
Cr-Original-Commit-Position: refs/heads/master@{#375673}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 11afb324fa322a3d651124f3ca244c9595f84768
4 files changed
tree: f19dbf4561e9f7ed3c46a1d627253e85f5e752b3
- tools/