Skip to content

Allow opt out of multiple arguments per option flag #1077

@sfoslund

Description

@sfoslund

The old parser used in the .NET CLI had behavior such that to specify multiple values for an option you had to include the option flag before each one:
--source source1 --source source2 argument
With System.CommandLine, we're able to specify options one after another without re-specifying the option flag:
--source source1 source2 argument
This creates confusion in the following case:
--source source1 argument
With existing CLI behavior, argument is treated as a command level argument whereas with existing system command line behavior it's treated as another argument to the --source option. It would be great is there's a way to opt out of this behavior to avoid breaking changes to the CLI. cc @jonsequitur

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions