Skip to content

error with positional parameter value starting with - #2

Description

@dnalor

given

		ARGPARSE_POSITIONAL(STRING, "infile", &inpath, "name of input file"),
		ARGPARSE_POSITIONAL(STRING, "outfile", &outpath, "name of output file (or -)")

running ./prg in.dat - will fail.

fix: in argparse_parse_args:

        } else if (starts_with(arg_string, "--")) { // "-" -> "--"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions