commandline icon indicating copy to clipboard operation
commandline copied to clipboard

[Verb("help")] not recognize, but recognize [Verb("help1")]

Open orangeagain opened this issue 3 years ago • 1 comments

mark option class as [Verb("help")] returen WithNotParsed(NullInstance)

Is a defult ignore verb "help"? how to recognize "help"?

orangeagain avatar Apr 04 '22 16:04 orangeagain

CommandLineParser has a built-in Help verb.

If you want to define your own Help verb, the built-in Help verb needs to be disabled by setting ParserSettings.AutoHelp to false. For example like this:

var parser = new CommandLine.Parser(with => with.AutoHelp = false);

elgonzo avatar Apr 04 '22 21:04 elgonzo