mirror of
https://github.com/nushell/nushell
synced 2024-12-27 05:23:11 +00:00
Adds the proper workarounds for short flags (#4794)
This commit is contained in:
parent
925e9f4dcb
commit
0835073d85
1 changed files with 8 additions and 12 deletions
20
src/main.rs
20
src/main.rs
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue