mirror of
https://github.com/nushell/nushell.git
synced 2025-04-24 21:28:20 +02:00
Fix for search terms in help --find
(#5081)
* Fix search terms in help --find * Update help --find description
This commit is contained in:
parent
d6dd4078b1
commit
20be8a4987
@ -27,7 +27,7 @@ impl Command for Help {
|
||||
.named(
|
||||
"find",
|
||||
SyntaxShape::String,
|
||||
"string to find in command usage",
|
||||
"string to find in command names, usage, and search terms",
|
||||
Some('f'),
|
||||
)
|
||||
.category(Category::Core)
|
||||
@ -70,7 +70,7 @@ impl Command for Help {
|
||||
result: None,
|
||||
},
|
||||
Example {
|
||||
description: "search for string in command usage",
|
||||
description: "search for string in command names, usage and search terms",
|
||||
example: "help --find char",
|
||||
result: None,
|
||||
},
|
||||
@ -103,7 +103,7 @@ fn help(
|
||||
let key = sig.name;
|
||||
let usage = sig.usage;
|
||||
let search_terms = sig.search_terms;
|
||||
let matches_term = if search_terms.is_empty() {
|
||||
let matches_term = if !search_terms.is_empty() {
|
||||
search_terms
|
||||
.iter()
|
||||
.any(|term| term.to_lowercase().contains(&search_string))
|
||||
|
Loading…
Reference in New Issue
Block a user