-
Notifications
You must be signed in to change notification settings - Fork 351
Closed
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers
Description
Options with the same name, but different number of dashes, are currently prohibited by the name validator.
ArgumentParser version: 0.3.0
Swift version: Swift version 5.3 (swiftlang-1200.0.28.1 clang-1200.0.30.1)
Checklist
- If possible, I've reproduced the issue using the
masterbranch of this package - I've searched for existing GitHub issues
Steps to Reproduce
For example, changing the Repeat example's count property to this:
@Option(name: [.long, .customLong("count", withSingleDash: true)],
help: "The number of times to repeat 'phrase'.")
var count: Int?results in:
Fatal error: Validation failed for `Repeat`:
- Multiple (2) `Option` or `Flag` arguments are named "count".
Expected behavior
Either -count or --count should work for that option.
Actual behavior
The error shown above.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers