Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comma separated value support for settings arrays / enumerables #826

Closed
sandreas opened this issue May 14, 2022 · 0 comments
Closed

Comma separated value support for settings arrays / enumerables #826

sandreas opened this issue May 14, 2022 · 0 comments

Comments

@sandreas
Copy link

sandreas commented May 14, 2022

Is your feature request related to a problem? Please describe.
Let's say you can define multiple colors for an enum array:

myapp --color="red" --color="green" --color="blue" --color="yellow"

I'm a bit frustrated, that I have to provide the option parameter 4 times, because it could be much shorter just providing the options with a separator.

Describe the solution you'd like

[CommandOption("--color", Separator = ",")]
public MyColor[] RemoveAdditionalFields { get; init; } = Array.Empty<MyColor>();
myapp --color="red,green,blue,yellow"

Describe alternatives you've considered

myapp --color "red" "green" "blue" "yellow"

What do you think?

@spectreconsole spectreconsole locked and limited conversation to collaborators Jul 9, 2022
@phil-scott-78 phil-scott-78 converted this issue into discussion #898 Jul 9, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant