Adds the proper workarounds for short flags (#4794)

This commit is contained in:
JT 2022-03-09 08:04:50 -05:00 committed by GitHub
parent 925e9f4dcb
commit 0835073d85
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -98,14 +98,10 @@ fn main() -> Result<()> {
if arg == "-c"
|| arg == "--commands"
|| arg == "--testbin"
|| arg == "--develop"
|| arg == "--debug"
|| arg == "--loglevel"
|| arg == "--config"
|| arg == "--perf"
|| arg == "--threads"
|| arg == "--version"
|| arg == "--log-level"
|| arg == "--config"
|| arg == "--threads"
|| arg == "-t"
{
collect_arg_nushell = true;
}
@ -383,11 +379,6 @@ impl Command for Nu {
"run the given commands and then exit",
Some('c'),
)
.optional(
"script file",
SyntaxShape::Filepath,
"name of the optional script file to run",
)
.named(
"config",
SyntaxShape::String,
@ -406,6 +397,11 @@ impl Command for Nu {
"threads to use for parallel commands",
Some('t'),
)
.optional(
"script file",
SyntaxShape::Filepath,
"name of the optional script file to run",
)
.rest(
"script args",
SyntaxShape::String,