Add examples for some more commands (#1765)

This commit is contained in:
Jason Gedge
2020-05-12 11:54:29 -04:00
committed by GitHub
parent 247d8b00f8
commit b0aa142542
25 changed files with 278 additions and 6 deletions

View File

@@ -39,6 +39,19 @@ impl WholeStreamCommand for Nth {
) -> Result<OutputStream, ShellError> {
args.process(registry, nth)?.run()
}
fn examples(&self) -> &[Example] {
&[
Example {
description: "Get the second row",
example: "echo [first second third] | get 1",
},
Example {
description: "Get the first and third rows",
example: "echo [first second third] | get 0 2",
},
]
}
}
fn nth(