Skip to content

Conversation

DannyBen
Copy link
Member

@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
@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