add a fair amount ofsearch terms (#6090)

This commit is contained in:
pwygab 2022-07-21 19:29:41 +08:00 committed by GitHub
parent 604025fe34
commit 8f00848ff9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 30 additions and 2 deletions

View file

@ -40,7 +40,7 @@ impl Command for BytesReverse {
} }
fn search_terms(&self) -> Vec<&str> { fn search_terms(&self) -> Vec<&str> {
vec!["convert", "inverse"] vec!["convert", "inverse", "flip"]
} }
fn run( fn run(

View file

@ -35,6 +35,10 @@ impl Command for Let {
true true
} }
fn search_terms(&self) -> Vec<&str> {
vec!["set", "const"]
}
fn run( fn run(
&self, &self,
engine_state: &EngineState, engine_state: &EngineState,

View file

@ -21,6 +21,10 @@ impl Command for Reverse {
"Reverses the table." "Reverses the table."
} }
fn search_terms(&self) -> Vec<&str> {
vec!["convert, inverse, flip"]
}
fn examples(&self) -> Vec<Example> { fn examples(&self) -> Vec<Example> {
vec![Example { vec![Example {
example: "[0,1,2,3] | reverse", example: "[0,1,2,3] | reverse",

View file

@ -29,6 +29,10 @@ impl Command for Select {
"Down-select table to only these columns." "Down-select table to only these columns."
} }
fn search_terms(&self) -> Vec<&str> {
vec!["pick", "choose", "get"]
}
fn run( fn run(
&self, &self,
engine_state: &EngineState, engine_state: &EngineState,

View file

@ -26,6 +26,10 @@ impl Command for Skip {
"Skip the first n elements of the input." "Skip the first n elements of the input."
} }
fn search_terms(&self) -> Vec<&str> {
vec!["ignore", "remove"]
}
fn examples(&self) -> Vec<Example> { fn examples(&self) -> Vec<Example> {
vec![ vec![
Example { Example {

View file

@ -28,6 +28,10 @@ impl Command for SkipUntil {
"Skip elements of the input until a predicate is true." "Skip elements of the input until a predicate is true."
} }
fn search_terms(&self) -> Vec<&str> {
vec!["ignore"]
}
fn examples(&self) -> Vec<Example> { fn examples(&self) -> Vec<Example> {
vec![Example { vec![Example {
description: "Skip until the element is positive", description: "Skip until the element is positive",

View file

@ -28,6 +28,10 @@ impl Command for SkipWhile {
"Skip elements of the input while a predicate is true." "Skip elements of the input while a predicate is true."
} }
fn search_terms(&self) -> Vec<&str> {
vec!["ignore"]
}
fn examples(&self) -> Vec<Example> { fn examples(&self) -> Vec<Example> {
vec![Example { vec![Example {
description: "Skip while the element is negative", description: "Skip while the element is negative",

View file

@ -28,7 +28,7 @@ impl Command for SubCommand {
} }
fn search_terms(&self) -> Vec<&str> { fn search_terms(&self) -> Vec<&str> {
vec!["convert", "inverse"] vec!["convert", "inverse", "flip"]
} }
fn run( fn run(

View file

@ -29,6 +29,10 @@ impl Command for Ps {
"View information about system processes." "View information about system processes."
} }
fn search_terms(&self) -> Vec<&str> {
vec!["procedures", "operations", "tasks", "ops"]
}
fn run( fn run(
&self, &self,
engine_state: &EngineState, engine_state: &EngineState,