mirror of
https://github.com/nushell/nushell
synced 2024-12-27 05:23:11 +00:00
Backport fixes from nushell/nushell.github.io#633 (#6712)
Co-authored-by: Eric Hodel <drbrain@segment7.net> Co-authored-by: Eric Hodel <drbrain@segment7.net>
This commit is contained in:
parent
5815f122ed
commit
d40a73aafe
1 changed files with 14 additions and 7 deletions
|
@ -33,8 +33,8 @@ impl Command for External {
|
|||
|
||||
fn signature(&self) -> nu_protocol::Signature {
|
||||
Signature::build(self.name())
|
||||
.switch("redirect-stdout", "redirect-stdout", None)
|
||||
.switch("redirect-stderr", "redirect-stderr", None)
|
||||
.switch("redirect-stdout", "redirect stdout to the pipeline", None)
|
||||
.switch("redirect-stderr", "redirect stderr to the pipeline", None)
|
||||
.required("command", SyntaxShape::Any, "external command to run")
|
||||
.rest("args", SyntaxShape::Any, "arguments for external command")
|
||||
.category(Category::System)
|
||||
|
@ -113,11 +113,18 @@ impl Command for External {
|
|||
}
|
||||
|
||||
fn examples(&self) -> Vec<Example> {
|
||||
vec![Example {
|
||||
description: "Run an external command",
|
||||
example: r#"run-external "echo" "-n" "hello""#,
|
||||
result: None,
|
||||
}]
|
||||
vec![
|
||||
Example {
|
||||
description: "Run an external command",
|
||||
example: r#"run-external "echo" "-n" "hello""#,
|
||||
result: None,
|
||||
},
|
||||
Example {
|
||||
description: "Redirect stdout from an external command into the pipeline",
|
||||
example: r#"run-external --redirect-stdout "echo" "-n" "hello" | split chars"#,
|
||||
result: None,
|
||||
},
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue