Skip to content

Would be great if variadic didn't require repeating the flag over and over #74

Open
@mdnorman

Description

@mdnorman

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

When using a long-named flag where short flags would cause ambiguity, it can be annoying to repeat the long flag name for every parameter. I've reverted to just using a string and parsing it with commas to avoid the use of the long flag.

Describe the solution you'd like
A clear and concise description of what you want to happen.

It would fantastic if variadic would allow multiple values one right after the other. eg:

--my-long-flag value1 value2 value3 --my-other-flag valueA valueB valueC --another flag

I understand that this wouldn't be great if there are also positional parameters, so maybe don't support it in those cases, or warn or fail only when there is ambiguity.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Another option is for variadic to just support a separator instead, like comma. I can do this with parsing, so it's more like syntactic sugar.

Additional context
Add any other context or screenshots about the feature request here.

Metadata

Metadata

Assignees

Labels

core ⚙Relates to the @stricli/core packageenhancement ✨New feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions