mirror of
https://github.com/nushell/nushell.git
synced 2024-12-23 23:49:44 +01:00
Tidy up help command text (#2566)
This commit is contained in:
parent
df2845a9b4
commit
365f76ad19
@ -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<OutputStream, ShellError> {
|
||||
benchmark(args, registry).await
|
||||
}
|
||||
|
||||
fn examples(&self) -> Vec<Example> {
|
||||
vec![Example {
|
||||
description: "Benchmarks a command within a block",
|
||||
example: "benchmark { sleep 500ms }",
|
||||
result: None,
|
||||
}]
|
||||
}
|
||||
}
|
||||
|
||||
async fn benchmark(
|
||||
|
@ -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<OutputStream, ShellError> {
|
||||
|
@ -16,7 +16,7 @@ impl WholeStreamCommand for Command {
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
"Work with dates."
|
||||
"Apply date function"
|
||||
}
|
||||
|
||||
async fn run(
|
||||
|
@ -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(
|
||||
|
@ -17,7 +17,7 @@ impl WholeStreamCommand for Command {
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
"moves across desired subcommand."
|
||||
"Moves across desired subcommand."
|
||||
}
|
||||
|
||||
async fn run(
|
||||
|
@ -48,7 +48,15 @@ impl WholeStreamCommand for RunExternalCommand {
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
""
|
||||
"Runs external command (not a nushell builtin)"
|
||||
}
|
||||
|
||||
fn examples(&self) -> Vec<Example> {
|
||||
vec![Example {
|
||||
description: "Run the external echo command",
|
||||
example: "run_external echo 'nushell'",
|
||||
result: None,
|
||||
}]
|
||||
}
|
||||
|
||||
async fn run(
|
||||
|
@ -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(
|
||||
|
@ -10,7 +10,7 @@ use regex::Regex;
|
||||
impl Plugin for Match {
|
||||
fn config(&mut self) -> Result<Signature, ShellError> {
|
||||
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())
|
||||
|
Loading…
Reference in New Issue
Block a user