-
Notifications
You must be signed in to change notification settings - Fork 441
Closed
Labels
Milestone
Description
The following test app:
@CommandLine.Command(name = "app")
public class App {
@CommandLine.Option(names = "-n", paramLabel = "NAME", description = "list of names", type = String.class/*, arity = "1..*"*/)
List<String> names = new LinkedList<>();
public static void main(String[] args) {
App app = new App();
CommandLine cl = new CommandLine(app);
cl.usage(System.out);
}
}
Produces:
Usage: app [-n[=NAME...]]
-n= =NAME...] list of names
It would be better something like this:
Usage: app [-n[=NAME...]]
-n= [NAME [NAME...]] list of names
Interestingly uncommenting the arity
specification produces a better usage:
Usage: app [-n=NAME [NAME...]]
-n= NAME [NAME...] list of names