Nu's rest arguments are source(s) files scripts to run. (#3624)

This commit is contained in:
Andrés N. Robalino
2021-06-15 20:38:56 -05:00
committed by GitHub
parent d0bca1fb0f
commit 0eae9c49b0
3 changed files with 21 additions and 10 deletions

View File

@ -10,10 +10,15 @@ impl WholeStreamCommand for Command {
fn signature(&self) -> Signature {
Signature::build("nu")
.switch("stdin", "stdin", None)
.switch("stdin", "redirect stdin", None)
.switch("skip-plugins", "do not load plugins", None)
.switch("no-history", "don't save history", None)
.named("commands", SyntaxShape::String, "commands", Some('c'))
.named(
"commands",
SyntaxShape::String,
"commands to run",
Some('c'),
)
.named(
"testbin",
SyntaxShape::String,
@ -34,8 +39,7 @@ impl WholeStreamCommand for Command {
"custom configuration source file",
None,
)
.optional("script", SyntaxShape::FilePath, "script to run")
.rest(SyntaxShape::String, "...")
.rest(SyntaxShape::String, "source file(s) to run")
}
fn usage(&self) -> &str {