Skip to content
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

feat: introduce greedy-arrays config, for specifying whether arrays consume multiple positionals #249

Merged
merged 2 commits into from Mar 1, 2020

Conversation

bcoe
Copy link
Member

@bcoe bcoe commented Mar 1, 2020

I'm convinced that the behavior of the array type is too aggressive, what folks actually want, is the ability to:

  1. default an argument to an array type, if only provided once.
  2. have support for typed arrays, e.g., both an array and a string.

This PR introduces the config option greedy-arrays, I think in yargs-parser@18 we should consider making this setting default to false.

@bcoe bcoe merged commit 60e880a into master Mar 1, 2020
@bcoe bcoe deleted the greedy-arrays branch March 1, 2020 01:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant