Is it possible to provide argument to @CommandLine.Command without explicitly naming the argument in picocli
?
As example the following command can be invoked as: open n 1
. However, I would like to be able to invoke the command as open 1
.
@CommandLine.Command(name = "open",
mixinStandardHelpOptions = true,
version = "1.0",
description = "Open note")
@Getter
@ToString
public class OpenCommand implements Runnable {
@CommandLine.ParentCommand TopLevelCommand parent;
@CommandLine.Option(names = {"number", "n"}, description = "Number of note to open")
private Integer number;
public void run() {
System.out.println(String.format("Number of note that will be opened: " + number));
}
}