-
Notifications
You must be signed in to change notification settings - Fork 54
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
Support combined boolean flags #18
Conversation
…of booleans (#11), add tests
…sure short argument keys are only one character, return boolean array instead of integer in boolean array key types, add tests
This commit adds support for combined boolean flags so that `-abc` will expand to `-a -b -c`. It also improves the logic of handling repeating boolean array flags like `-vvvv`. Both features now simply split the string into characters, and push them onto the argv array if they are have valid handlers. This avoids having more complex logic.
Very nice work @pacocoursey – wrote down some notes |
Awesome PR, thank you! 😊 Would you mind adding Codegov to the repo? Now CLI is a great example for this. Here's the badge:
I added the You can find the Codecov page here. |
Having never used Codecov or CircleCI, I feel a little out of my depth. But there's my attempt anyways, based on the configs in Also added a |
In the future can we keep these as separate PRs? It's quickly become a kitchen sink of changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was the yarn.lock here before?
Superseded by #27. Thanks for all of the work, @pacocoursey :) |
This pull request builds upon #14 and should be a major bump if merged.
I guess 14 can be closed? Not sure of the best way to build upon an open pull request and also introduce a new feature.
-abcd
will correctly be interpreted as-a -b -c -d
.-abcc
will be result in[true, true]
if-c
was declared as a[Boolean]
.Also generally improves the logic so that it will be easier to add support for whatever comes out of #11.