mirror of
https://github.com/nushell/nushell
synced 2024-12-27 05:23:11 +00:00
Add search terms for all?
, any?
, length
, and keybindings
(#5665)
* Add search terms for `all?` JavaScript has `Array.every` similar to `all?` * Add search terms for `any?` JavaScript has `Array.some` similar to `any?` * Add search terms for `length` Count, `len()`, and `size`/`sizeof` in widely-known programming languages are equivalent to `length` * Add search terms for `keybindings` Shortcut and hotkey are common synonyms (especially in web and GUI land) for keybindings.
This commit is contained in:
parent
545b1dcd94
commit
6365ba0286
4 changed files with 16 additions and 0 deletions
|
@ -27,6 +27,10 @@ impl Command for All {
|
|||
"Test if every element of the input matches a predicate."
|
||||
}
|
||||
|
||||
fn search_terms(&self) -> Vec<&str> {
|
||||
vec!["every"]
|
||||
}
|
||||
|
||||
fn examples(&self) -> Vec<Example> {
|
||||
vec![
|
||||
Example {
|
||||
|
|
|
@ -27,6 +27,10 @@ impl Command for Any {
|
|||
"Tests if any element of the input matches a predicate."
|
||||
}
|
||||
|
||||
fn search_terms(&self) -> Vec<&str> {
|
||||
vec!["some"]
|
||||
}
|
||||
|
||||
fn examples(&self) -> Vec<Example> {
|
||||
vec![
|
||||
Example {
|
||||
|
|
|
@ -24,6 +24,10 @@ impl Command for Length {
|
|||
.category(Category::Filters)
|
||||
}
|
||||
|
||||
fn search_terms(&self) -> Vec<&str> {
|
||||
vec!["count", "len", "size"]
|
||||
}
|
||||
|
||||
fn run(
|
||||
&self,
|
||||
engine_state: &EngineState,
|
||||
|
|
|
@ -21,6 +21,10 @@ impl Command for Keybindings {
|
|||
"Keybindings related commands"
|
||||
}
|
||||
|
||||
fn search_terms(&self) -> Vec<&str> {
|
||||
vec!["shortcut", "hotkey"]
|
||||
}
|
||||
|
||||
fn run(
|
||||
&self,
|
||||
engine_state: &EngineState,
|
||||
|
|
Loading…
Reference in a new issue