rvesse / airline

Java annotation-based framework for parsing Git like command line structures with deep extensibility
https://rvesse.github.io/airline/
Apache License 2.0
128 stars 20 forks source link

option arity #109

Closed gmseed closed 3 years ago

gmseed commented 3 years ago

Maybe I'm misinterpreting how arity works, but I have the following for a given command:

@Option(name = { "-h", "--help"}, 
        description = "help",
        arity=0)
@Unrestricted
private String help;

@Option(name = { "-o", "--open"},
        description = "open",
        arity=1) // arity=1 ensuring we have a file path/file for -open
@Unrestricted
private String open;

@Option(name = { "-d", "--debug"},
        description = "debug",
        arity=0)
@Unrestricted
private String debug;

....

I run with the cmd-line-args "--help --debug" but it doesn't complain about the missing -open argument.

I've tried numerous permutations and can't get any sense out of it.