Skip to content

Allow an option to have multiple values assigned using a comma-separated list #37

Open
@MarkMichaelis

Description

@MarkMichaelis

Update the lexer to support specifying an option that supports more than one argument using a comma-separated list:
e.g. DisplayTable -column FirstColumn, SecondColumn
Whitespace around the comma is allowed.

Activity

self-assigned this
on May 23, 2018
PandaMagnus

PandaMagnus commented on May 23, 2018

@PandaMagnus

Regex patterns are definitely not my forte, so if someone else sees this and wants it done faster than I can do, feel free to take it (and if possible, I'd love to pair on it). I'll make sure to push any tests I write to a WIP PR.

jonsequitur

jonsequitur commented on May 23, 2018

@jonsequitur
Contributor

@PandaMagnus, the lexer isn't using a regex, but the tokenizer is. This feature would impact both, assuming spaces between comma-grouped items are allowed as in @MarkMichaelis's example.

PandaMagnus

PandaMagnus commented on May 23, 2018

@PandaMagnus

@jonsequitur Understood. I'll make sure to take a look at the lexer as well. If I get in over my head I'll pair or set it aside.

jonsequitur

jonsequitur commented on May 23, 2018

@jonsequitur
Contributor

I expect that the lexer and core parse operations will need an overhaul at some point. The implementation isn't elegant and the performance needs to be improved. That might be the kind of thing that we undertake first, with improvements like this in mind, before adding support for additional cases.

removed their assignment
on May 23, 2018
jonsequitur

jonsequitur commented on Jun 9, 2018

@jonsequitur
Contributor

In addition to , as a split delimiter, I've seen examples of | and ;, so making the actual split delimiter configurable by the user would be a good idea.

14 remaining items

Loading
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

        Participants

        @jonsequitur@MarkMichaelis@PandaMagnus@srsaggam

        Issue actions

          Allow an option to have multiple values assigned using a comma-separated list · Issue #37 · dotnet/command-line-api