Use search terms in the help menu search (#5708)

Currently only `help --find` was using the search terms.  With this change they will also be used by the `F1` help menu
This commit is contained in:
Stefan Holderbach 2022-06-03 20:30:36 +02:00 committed by GitHub
parent 888758b813
commit 0c16464320
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -19,6 +19,10 @@ impl NuHelpCompleter {
.filter(|(sig, _, _, _)| {
sig.name.to_lowercase().contains(&line.to_lowercase())
|| sig.usage.to_lowercase().contains(&line.to_lowercase())
|| sig
.search_terms
.iter()
.any(|term| term.to_lowercase().contains(&line.to_lowercase()))
|| sig
.extra_usage
.to_lowercase()