Support explicit arity min max with @Option
- @Option now has arityMin/arityMax which if defined, non-negative, are used instead of arity. - Fixes #731
This commit is contained in:
@@ -73,7 +73,7 @@ public class ArityCommands {
|
||||
|
||||
@Command(command = "arity-string-array")
|
||||
public String testArityStringArrayAnnotation(
|
||||
@Option(longNames = "arg1", defaultValue = "true", arity = OptionArity.ZERO_OR_MORE)
|
||||
@Option(longNames = "arg1", defaultValue = "true", arityMax = 3)
|
||||
String[] arg1
|
||||
) {
|
||||
return "Hello " + Arrays.asList(arg1);
|
||||
|
||||
Reference in New Issue
Block a user