dotnet / dotnet/command-line-api
Option with non-eager optional argument, like --backup[=CONTROL]
Open
Area-Parser and Binder
bug
- Dominant language
- C#
- Stars
- 3.7k
- Forks
- 428
- PR merge metrics
- No merged PRs in 30d
Description
In GNU `getopt_long`, if an option has an optional argument, then it has to be in the same element of `char *argv[]`, connected with an equals sign. Thus, `numbered` is parsed as the argument of the option in `cp --backup=numbered source directory/` but as a separate argument (and treated as a file name) in `cp --backup numbered source directory/`. AFAICT, System.CommandLine cannot be configured to behave this way.
Contributor guide
Assessment
This issue has not been assessed yet.