Skip to content

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

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;
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions