diff --git a/crates/nu-command/src/dataframe/expressions/alias.rs b/crates/nu-command/src/dataframe/expressions/alias.rs index 81d78d159..59af9e2f6 100644 --- a/crates/nu-command/src/dataframe/expressions/alias.rs +++ b/crates/nu-command/src/dataframe/expressions/alias.rs @@ -59,6 +59,10 @@ impl Command for ExprAlias { }] } + fn search_terms(&self) -> Vec<&str> { + vec!["aka", "abbr", "otherwise"] + } + fn run( &self, engine_state: &EngineState, diff --git a/crates/nu-command/src/dataframe/expressions/arg_where.rs b/crates/nu-command/src/dataframe/expressions/arg_where.rs index 90f4d2b95..8b89f2599 100644 --- a/crates/nu-command/src/dataframe/expressions/arg_where.rs +++ b/crates/nu-command/src/dataframe/expressions/arg_where.rs @@ -43,6 +43,10 @@ impl Command for ExprArgWhere { }] } + fn search_terms(&self) -> Vec<&str> { + vec!["condition", "match", "if"] + } + fn run( &self, engine_state: &EngineState, diff --git a/crates/nu-command/src/dataframe/expressions/as_nu.rs b/crates/nu-command/src/dataframe/expressions/as_nu.rs index 287b40994..bca323f52 100644 --- a/crates/nu-command/src/dataframe/expressions/as_nu.rs +++ b/crates/nu-command/src/dataframe/expressions/as_nu.rs @@ -37,6 +37,10 @@ impl Command for ExprAsNu { }] } + fn search_terms(&self) -> Vec<&str> { + vec!["convert", "conversion"] + } + fn run( &self, _engine_state: &EngineState, diff --git a/crates/nu-command/src/dataframe/expressions/col.rs b/crates/nu-command/src/dataframe/expressions/col.rs index 8066e8f0b..323688275 100644 --- a/crates/nu-command/src/dataframe/expressions/col.rs +++ b/crates/nu-command/src/dataframe/expressions/col.rs @@ -43,6 +43,10 @@ impl Command for ExprCol { }] } + fn search_terms(&self) -> Vec<&str> { + vec!["create"] + } + fn run( &self, engine_state: &EngineState, diff --git a/crates/nu-command/src/dataframe/expressions/concat_str.rs b/crates/nu-command/src/dataframe/expressions/concat_str.rs index 3f847a0cc..82a69b192 100644 --- a/crates/nu-command/src/dataframe/expressions/concat_str.rs +++ b/crates/nu-command/src/dataframe/expressions/concat_str.rs @@ -69,6 +69,10 @@ impl Command for ExprConcatStr { }] } + fn search_terms(&self) -> Vec<&str> { + vec!["join", "connect", "update"] + } + fn run( &self, engine_state: &EngineState, diff --git a/crates/nu-command/src/dataframe/expressions/is_in.rs b/crates/nu-command/src/dataframe/expressions/is_in.rs index 9051b4aa2..e384874de 100644 --- a/crates/nu-command/src/dataframe/expressions/is_in.rs +++ b/crates/nu-command/src/dataframe/expressions/is_in.rs @@ -65,6 +65,10 @@ impl Command for ExprIsIn { }] } + fn search_terms(&self) -> Vec<&str> { + vec!["check", "contained", "is-contain", "match"] + } + fn run( &self, engine_state: &EngineState, diff --git a/crates/nu-command/src/dataframe/expressions/lit.rs b/crates/nu-command/src/dataframe/expressions/lit.rs index 1468dc452..c1ea60419 100644 --- a/crates/nu-command/src/dataframe/expressions/lit.rs +++ b/crates/nu-command/src/dataframe/expressions/lit.rs @@ -42,6 +42,10 @@ impl Command for ExprLit { }] } + fn search_terms(&self) -> Vec<&str> { + vec!["string", "literal", "expression"] + } + fn run( &self, engine_state: &EngineState, diff --git a/crates/nu-command/src/dataframe/expressions/otherwise.rs b/crates/nu-command/src/dataframe/expressions/otherwise.rs index 001838766..d0466a616 100644 --- a/crates/nu-command/src/dataframe/expressions/otherwise.rs +++ b/crates/nu-command/src/dataframe/expressions/otherwise.rs @@ -79,6 +79,10 @@ impl Command for ExprOtherwise { ] } + fn search_terms(&self) -> Vec<&str> { + vec!["condition", "else"] + } + fn run( &self, engine_state: &EngineState, diff --git a/crates/nu-command/src/dataframe/expressions/quantile.rs b/crates/nu-command/src/dataframe/expressions/quantile.rs index d0a5c3166..5dfb48ed8 100644 --- a/crates/nu-command/src/dataframe/expressions/quantile.rs +++ b/crates/nu-command/src/dataframe/expressions/quantile.rs @@ -55,6 +55,10 @@ impl Command for ExprQuantile { }] } + fn search_terms(&self) -> Vec<&str> { + vec!["statistics", "percentile", "distribution"] + } + fn run( &self, engine_state: &EngineState, diff --git a/crates/nu-command/src/dataframe/expressions/when.rs b/crates/nu-command/src/dataframe/expressions/when.rs index d92a2bcbf..694975ba2 100644 --- a/crates/nu-command/src/dataframe/expressions/when.rs +++ b/crates/nu-command/src/dataframe/expressions/when.rs @@ -85,6 +85,10 @@ impl Command for ExprWhen { ] } + fn search_terms(&self) -> Vec<&str> { + vec!["condition", "match", "if", "else"] + } + fn run( &self, engine_state: &EngineState, diff --git a/crates/nu-command/src/random/bool.rs b/crates/nu-command/src/random/bool.rs index 8b41179f9..b53e79d79 100644 --- a/crates/nu-command/src/random/bool.rs +++ b/crates/nu-command/src/random/bool.rs @@ -31,6 +31,10 @@ impl Command for SubCommand { "Generate a random boolean value" } + fn search_terms(&self) -> Vec<&str> { + vec!["generate", "boolean", "true", "false", "1", "0"] + } + fn run( &self, engine_state: &EngineState, diff --git a/crates/nu-command/src/random/chars.rs b/crates/nu-command/src/random/chars.rs index 5fbc5ce7a..df0a34078 100644 --- a/crates/nu-command/src/random/chars.rs +++ b/crates/nu-command/src/random/chars.rs @@ -31,6 +31,10 @@ impl Command for SubCommand { "Generate random chars" } + fn search_terms(&self) -> Vec<&str> { + vec!["generate", "character", "symbol", "alphanumeric"] + } + fn run( &self, engine_state: &EngineState, diff --git a/crates/nu-command/src/random/decimal.rs b/crates/nu-command/src/random/decimal.rs index 36642a9cd..78dd6d7c9 100644 --- a/crates/nu-command/src/random/decimal.rs +++ b/crates/nu-command/src/random/decimal.rs @@ -27,6 +27,10 @@ impl Command for SubCommand { "Generate a random decimal within a range [min..max]" } + fn search_terms(&self) -> Vec<&str> { + vec!["generate", "float"] + } + fn run( &self, engine_state: &EngineState, diff --git a/crates/nu-command/src/random/dice.rs b/crates/nu-command/src/random/dice.rs index 62fc1b632..b3bbdddd5 100644 --- a/crates/nu-command/src/random/dice.rs +++ b/crates/nu-command/src/random/dice.rs @@ -37,6 +37,10 @@ impl Command for SubCommand { "Generate a random dice roll" } + fn search_terms(&self) -> Vec<&str> { + vec!["generate", "die", "1-6"] + } + fn run( &self, engine_state: &EngineState, diff --git a/crates/nu-command/src/random/integer.rs b/crates/nu-command/src/random/integer.rs index eda0de9a0..afdb4fb9a 100644 --- a/crates/nu-command/src/random/integer.rs +++ b/crates/nu-command/src/random/integer.rs @@ -27,6 +27,10 @@ impl Command for SubCommand { "Generate a random integer [min..max]" } + fn search_terms(&self) -> Vec<&str> { + vec!["generate", "natural", "number"] + } + fn run( &self, engine_state: &EngineState, diff --git a/crates/nu-command/src/random/uuid.rs b/crates/nu-command/src/random/uuid.rs index 09a30bfe7..b0b6d39e5 100644 --- a/crates/nu-command/src/random/uuid.rs +++ b/crates/nu-command/src/random/uuid.rs @@ -22,6 +22,10 @@ impl Command for SubCommand { "Generate a random uuid4 string" } + fn search_terms(&self) -> Vec<&str> { + vec!["generate", "uuid4"] + } + fn run( &self, _engine_state: &EngineState,