Tidy up help command text (#2566)

This commit is contained in:
Chris Gillespie 2020-09-17 23:13:53 -07:00 committed by GitHub
parent df2845a9b4
commit 365f76ad19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 24 additions and 8 deletions

View File

@ -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(

View File

@ -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> {

View File

@ -16,7 +16,7 @@ impl WholeStreamCommand for Command {
}
fn usage(&self) -> &str {
"Work with dates."
"Apply date function"
}
async fn run(

View File

@ -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(

View File

@ -17,7 +17,7 @@ impl WholeStreamCommand for Command {
}
fn usage(&self) -> &str {
"moves across desired subcommand."
"Moves across desired subcommand."
}
async fn run(

View File

@ -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(

View File

@ -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(

View File

@ -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())