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

Make isMultiple non-greedy #162

Merged
merged 8 commits into from Oct 28, 2020
Merged

Conversation

ulken
Copy link
Contributor

@ulken ulken commented Oct 1, 2020

I.e don't consume more than one argument.

The default behavior of yargs-parser is to greedily consume array flag arguments.

I also realized it doesn't support comma-separated values. Not sure if we want that or not, but I'll make a separate PR and let you be the judge.

Fixes #160

I.e don't consume more than one argument
@sindresorhus
Copy link
Owner

I think we should explicitly document this behavior.

@sindresorhus
Copy link
Owner

Bump :)

@ulken
Copy link
Contributor Author

ulken commented Oct 20, 2020

Yeah, sorry. I started looking into it, but then my son woke up 😅

I'll get to it in the coming days.

@ulken
Copy link
Contributor Author

ulken commented Oct 20, 2020

@sindresorhus Alright. All yours.

@voxpelli
Copy link
Contributor

LGTM 👍

@ulken
Copy link
Contributor Author

ulken commented Oct 22, 2020

Came to think of: do we want the tests to be as explicit? We have a test for space-separation. Should I add a test for a comma-separated value as well?

I mean, to "document" the (non-)behavior.

@ulken
Copy link
Contributor Author

ulken commented Oct 25, 2020

Went ahead and added it. Feel free to skip/revert.

@sindresorhus sindresorhus merged commit 49ce74d into sindresorhus:master Oct 28, 2020
@sindresorhus
Copy link
Owner

Thanks for this 👍🏻

voxpelli added a commit to voxpelli/node-installed-check that referenced this pull request Jan 28, 2021
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.

isMultiple string flag is matching also the input arguments
3 participants