public int compare(OptionSpec o1, OptionSpec o2) { return o1.shortestName().compareTo(o2.shortestName()); } });
boolean isFlagOption = option.typeInfo().isBoolean(); if (isFlagOption && option.arity().max <= 0) { // #612 consider arity: boolean options may require a parameter String shortestName = option.shortestName(); if (shortestName.length() == 2 && shortestName.startsWith("-")) { booleanOptions.add(option); Text name = colorScheme.optionText(option.shortestName()); Text param = parameterLabelRenderer().renderParameterLabel(option, colorScheme.ansi(), colorScheme.optionParamStyles); if (option.required()) { // e.g., -x=VAL
if (option.hidden()) { continue; } if (option.type() == boolean.class || option.type() == Boolean.class) { String shortestName = option.shortestName(); if (shortestName.length() == 2 && shortestName.startsWith("-")) { booleanOptions.add(option); Text name = colorScheme.optionText(option.shortestName()); Text param = parameterLabelRenderer().renderParameterLabel(option, colorScheme.ansi(), colorScheme.optionParamStyles); if (option.required()) { // e.g., -x=VAL