diff --git a/crates/nu-cli/src/commands/benchmark.rs b/crates/nu-cli/src/commands/benchmark.rs index a5776a3f93..d66354950f 100644 --- a/crates/nu-cli/src/commands/benchmark.rs +++ b/crates/nu-cli/src/commands/benchmark.rs @@ -30,7 +30,7 @@ impl WholeStreamCommand for Benchmark { } fn usage(&self) -> &str { - "Runs a block and return the time it took to do execute it. Eg) benchmark { echo $nu.env.NAME }" + "Runs a block and returns the time it took to execute it" } async fn run( @@ -40,6 +40,14 @@ impl WholeStreamCommand for Benchmark { ) -> Result { benchmark(args, registry).await } + + fn examples(&self) -> Vec { + vec![Example { + description: "Benchmarks a command within a block", + example: "benchmark { sleep 500ms }", + result: None, + }] + } } async fn benchmark( diff --git a/crates/nu-cli/src/commands/clear.rs b/crates/nu-cli/src/commands/clear.rs index 5d7647018b..574e9da362 100644 --- a/crates/nu-cli/src/commands/clear.rs +++ b/crates/nu-cli/src/commands/clear.rs @@ -17,7 +17,7 @@ impl WholeStreamCommand for Clear { } fn usage(&self) -> &str { - "clears the terminal" + "Clears the terminal" } async fn run(&self, _: CommandArgs, _: &CommandRegistry) -> Result { diff --git a/crates/nu-cli/src/commands/date/command.rs b/crates/nu-cli/src/commands/date/command.rs index 3867fd2729..e1f09b0b69 100644 --- a/crates/nu-cli/src/commands/date/command.rs +++ b/crates/nu-cli/src/commands/date/command.rs @@ -16,7 +16,7 @@ impl WholeStreamCommand for Command { } fn usage(&self) -> &str { - "Work with dates." + "Apply date function" } async fn run( diff --git a/crates/nu-cli/src/commands/group_by.rs b/crates/nu-cli/src/commands/group_by.rs index d5449f04db..72063fe839 100644 --- a/crates/nu-cli/src/commands/group_by.rs +++ b/crates/nu-cli/src/commands/group_by.rs @@ -28,7 +28,7 @@ impl WholeStreamCommand for GroupBy { } fn usage(&self) -> &str { - "create a new table grouped." + "Create a new table grouped." } async fn run( diff --git a/crates/nu-cli/src/commands/move_/command.rs b/crates/nu-cli/src/commands/move_/command.rs index 739b3183e7..f563a98c74 100644 --- a/crates/nu-cli/src/commands/move_/command.rs +++ b/crates/nu-cli/src/commands/move_/command.rs @@ -17,7 +17,7 @@ impl WholeStreamCommand for Command { } fn usage(&self) -> &str { - "moves across desired subcommand." + "Moves across desired subcommand." } async fn run( diff --git a/crates/nu-cli/src/commands/run_external.rs b/crates/nu-cli/src/commands/run_external.rs index 24e59845d7..3ec2151079 100644 --- a/crates/nu-cli/src/commands/run_external.rs +++ b/crates/nu-cli/src/commands/run_external.rs @@ -48,7 +48,15 @@ impl WholeStreamCommand for RunExternalCommand { } fn usage(&self) -> &str { - "" + "Runs external command (not a nushell builtin)" + } + + fn examples(&self) -> Vec { + vec![Example { + description: "Run the external echo command", + example: "run_external echo 'nushell'", + result: None, + }] } async fn run( diff --git a/crates/nu-cli/src/commands/sleep.rs b/crates/nu-cli/src/commands/sleep.rs index 1a5dab8a95..360fb9b445 100644 --- a/crates/nu-cli/src/commands/sleep.rs +++ b/crates/nu-cli/src/commands/sleep.rs @@ -37,7 +37,7 @@ impl WholeStreamCommand for Sleep { } fn usage(&self) -> &str { - "delay for a specified amount of time" + "Delay for a specified amount of time" } async fn run( diff --git a/crates/nu_plugin_match/src/nu/mod.rs b/crates/nu_plugin_match/src/nu/mod.rs index c0a39e5104..3ecbcc768f 100644 --- a/crates/nu_plugin_match/src/nu/mod.rs +++ b/crates/nu_plugin_match/src/nu/mod.rs @@ -10,7 +10,7 @@ use regex::Regex; impl Plugin for Match { fn config(&mut self) -> Result { Ok(Signature::build("match") - .desc("filter rows by regex") + .desc("Filter rows by Regex pattern") .required("member", SyntaxShape::String, "the column name to match") .required("regex", SyntaxShape::String, "the regex to match with") .filter())