我正在使用使用 PicoCLI v4.0.0-alpha-3 的命令。No matter which options I try, the one that shows at the top (when the list of options is displayed in the CL) is always to the right of the other options. 如何配置它以使命令的所有选项都在同一级别对齐?
@CommandLine.Command(name = "",
description = "test",
header = "%n@|green test|@",
footer = {"",
"@|cyan Press Ctrl-D to exit the CLI.|@",
""},
version = "1.0.0",
showDefaultValues = true,
optionListHeading = "@|bold %nOptions|@:%n",
subcommands = {
Abc.class,
Def.class
})
public class Tester implements Callable<Integer> {
@Option(names = {"-v", "--verbose"}, description = "Verbose mode. Helpful for troubleshooting.")
private boolean verboseMode;
@Option(names = {"-a", "--autocomplete"}, description = "Generate sample autocomplete")
private boolean autocomplete;
在 CLI 上显示
Options:
--v, --version Show version info and exit.
-a, --autocomplete Generate sample autocomplete
第一个选项总是错位的。我试图确保第一个选项与其他选项处于同一级别。