Skip to content

Argument names with characters other than letters (like underscores or numbers) don't work #147

Open
@ericonr

Description

@ericonr
#include "docopt.h"

static const char usage[] =
R"(Usage:
    underscore -a BASE_ADDRESS
)";


int main(int argc, char *argv[])
{
    auto args = docopt::docopt(usage, {argv+1, argv+argc}, true);
}

This prints:

$ ./underscore -a 1
Arguments did not match expected patterns
Usage:
    underscore -a BASE_ADDRESS

If BASE_ADDRESS becomes BASE1ADDRESS or BASE-ADDRESS, the error still happens.

This should be either documented or fixed, I think.

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

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions