mirror of
https://github.com/nushell/nushell.git
synced 2024-11-27 02:44:01 +01:00
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:
parent
888758b813
commit
0c16464320
@ -19,6 +19,10 @@ impl NuHelpCompleter {
|
|||||||
.filter(|(sig, _, _, _)| {
|
.filter(|(sig, _, _, _)| {
|
||||||
sig.name.to_lowercase().contains(&line.to_lowercase())
|
sig.name.to_lowercase().contains(&line.to_lowercase())
|
||||||
|| sig.usage.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
|
|| sig
|
||||||
.extra_usage
|
.extra_usage
|
||||||
.to_lowercase()
|
.to_lowercase()
|
||||||
|
Loading…
Reference in New Issue
Block a user