mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 23:07:46 +02:00
Add search terms in random and expression categories (#7736)
# Description Refers to: [5093](https://github.com/nushell/nushell/issues/5093) # Tests - [x] `cargo fmt --all -- --check` to check standard code formatting (`cargo fmt --all` applies these changes) - [x] `cargo clippy --workspace -- -D warnings -D clippy::unwrap_used -A clippy::needless_collect` to check that you're using the standard code style - [x] `cargo test --workspace` to check that all tests pass
This commit is contained in:
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
Reference in New Issue
Block a user