Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
nemec opened this issue Mar 11, 2019 · 0 comments

Comments

@nemec
Copy link
Owner

nemec commented Mar 11, 2019

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;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant