Skip to content

When parsing fails and user added a verb (that exists), display help for that verb rather than the general help. #53

@nemec

Description

@nemec

Additionally, allow devs to tell whether or not a verb was invoked if they wish to display the error message manually. Example:

var parser = new CliParser<Options>();
try
{
    parser.Parse(args, opt)
        .GetValueOrThrow();
}
catch (AggregateException e)
{
    var help = new clipr.Usage.AutomaticHelpGenerator<Options>();  // Would like to use Options or Verb here
    Console.Error.WriteLine(help.GetHelp(parser.BuildConfig()));
    return;
}

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions