mirror of
https://github.com/nushell/nushell.git
synced 2025-06-30 14:40:06 +02:00
Nu's rest arguments are source(s) files scripts to run. (#3624)
This commit is contained in:
committed by
GitHub
parent
d0bca1fb0f
commit
0eae9c49b0
@ -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 {
|
||||
|
Reference in New Issue
Block a user