Skip to content

Bad example or bug in new parser implementation? #178

@Steve-OH

Description

@Steve-OH

The example given at https://docopt.github.io/docopt.net/dev/#help-in-a-external-file has this code:

return Docopt.CreateParser(help)
             .WithVersion("Naval Fate 2.0")
             .Parse(args)
             .Match(Run,
                    result => ShowHelp(result.Help),
                    result => ShowVersion(result.Version),
                    result => OnError(result.Usage));

but there is no public parser variation with a Match method that takes three functions for help, version and usage. It's not clear to me from looking at the source code in Parser.cs whether this is an oversight or working as designed (i.e., there is an IHelpFeaturingParser and an IVersionFeaturingParser but no IHelpAndVersionFeaturingParser).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions