Skip to content

Varargs positional arguments consume unmatched options #1015

@smowton

Description

@smowton

This is an extension of b287f78

When consuming arguments for a varargs positional argument you check that the next arg isn't a recognised option, but not whether it resembles an option.

Thus mycmd --real-option arg and mycmd arg --real-option are handled symmetrically (one positional arg and one option consumed), but mycmd --no-such-option arg and mycmd arg --no-such-option are not (1 unmatched, 1 positional and 0 unmatched, 2 positional respectively).

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions