commandlineparser / commandlineparser/commandline
How to parse a command line with an an invalid parameter
Open
- Dominant language
- C#
- Stars
- 4.8k
- Forks
- 478
- PR merge metrics
- No merged PRs in 30d
Description
I want to parse command line but with the possibility of providing an incorrect parameter.
I tried for example:
```
Parser.Default.ParseArguments(Environment.GetCommandLineArgs())
.WithNotParsed(errs => {
// code for errors
})
.WithParsed(opt => {
// code for valid options
});
```
but in situation when any command line parametr is incorrect commandline parser calls only code for errors handling ( "code for errors" in my example).
So how to handle valid parameters and skip incorrect?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.