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

Add support for unique in repeatable flag args #454

Merged
merged 5 commits into from
Dec 7, 2023

Conversation

DannyBen
Copy link
Owner

@DannyBen DannyBen commented Dec 7, 2023

As discussed in #452

This PR allows specifying unique: true for a flag, when it is repeatable: true and has an arg:

flags:
- long: --path
  arg: location
  help: Set one or more paths
  repeatable: true
  unique: true    # <-- New option

so that the following command line:

./cli --path one --path two --path one

will result in "one two" and not "one two one".

@DannyBen DannyBen merged commit 12b8cdd into master Dec 7, 2023
6 checks passed
@DannyBen DannyBen deleted the add/unique-repeatable-flag branch December 7, 2023 07:48
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.

1 participant