You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Index: src/main/java/picocli/CommandLine.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- src/main/java/picocli/CommandLine.java (revision )
+++ src/main/java/picocli/CommandLine.java (revision )
@@ -2990,7 +2990,10 @@
// if no long option, fill in the space between the short option name and the param label value
if (paramLabelText.length > 0 && longOption.length() == 0) {
sep = paramLabelRenderer.separator();
- paramLabelText = paramLabelText.substring(sep.length());
+ // #181 paramLabelText may be =LABEL or [=LABEL...]
+ int sepStart = paramLabelText.plainString().indexOf(sep);
+ Text prefix = paramLabelText.substring(0, sepStart);
+ paramLabelText = prefix.append(paramLabelText.substring(sepStart + sep.length()));
}
Text longOptionText = scheme.optionText(longOption);
longOptionText = longOptionText.append(paramLabelText);
This only happens for short options, not when an option has either both a short and a long option or just long options.
The help message looks like this. Note the double
=
and the missing opening square bracket[
in the options list:When a long option is specified, or arity=1, things look okay:
The text was updated successfully, but these errors were encountered: