mirror of
https://github.com/nushell/nushell.git
synced 2025-02-23 22:11:53 +01: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
@ -27,6 +27,10 @@ impl Command for All {
|
|||||||
"Test if every element of the input matches a predicate."
|
"Test if every element of the input matches a predicate."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn search_terms(&self) -> Vec<&str> {
|
||||||
|
vec!["every"]
|
||||||
|
}
|
||||||
|
|
||||||
fn examples(&self) -> Vec<Example> {
|
fn examples(&self) -> Vec<Example> {
|
||||||
vec![
|
vec![
|
||||||
Example {
|
Example {
|
||||||
|
@ -27,6 +27,10 @@ impl Command for Any {
|
|||||||
"Tests if any element of the input matches a predicate."
|
"Tests if any element of the input matches a predicate."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn search_terms(&self) -> Vec<&str> {
|
||||||
|
vec!["some"]
|
||||||
|
}
|
||||||
|
|
||||||
fn examples(&self) -> Vec<Example> {
|
fn examples(&self) -> Vec<Example> {
|
||||||
vec![
|
vec![
|
||||||
Example {
|
Example {
|
||||||
|
@ -24,6 +24,10 @@ impl Command for Length {
|
|||||||
.category(Category::Filters)
|
.category(Category::Filters)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn search_terms(&self) -> Vec<&str> {
|
||||||
|
vec!["count", "len", "size"]
|
||||||
|
}
|
||||||
|
|
||||||
fn run(
|
fn run(
|
||||||
&self,
|
&self,
|
||||||
engine_state: &EngineState,
|
engine_state: &EngineState,
|
||||||
|
@ -21,6 +21,10 @@ impl Command for Keybindings {
|
|||||||
"Keybindings related commands"
|
"Keybindings related commands"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn search_terms(&self) -> Vec<&str> {
|
||||||
|
vec!["shortcut", "hotkey"]
|
||||||
|
}
|
||||||
|
|
||||||
fn run(
|
fn run(
|
||||||
&self,
|
&self,
|
||||||
engine_state: &EngineState,
|
engine_state: &EngineState,
|
||||||
|
Loading…
Reference in New Issue
Block a user