-
Notifications
You must be signed in to change notification settings - Fork 446
Closed
Labels
Milestone
Description
If we print help for the following example command
@Command(mixinStandardHelpOptions = true)
public class ExampleCommand {
@Option(names = { "-b" }, arity = "1")
boolean booleanWithArity1;
}
the message looks like this
Usage: <main class> [-hVb]
-b=<booleanWithArity1>
-h, --help Show this help message and exit.
-V, --version Print version information and exit.
As we expect value for the '-b' option, I think that usage line should look like
Usage: <main class> [-hV] [-b=<booleanWithArity1>]
The problem does not occur when we define only a name with double '-' for such an option.
@Command(mixinStandardHelpOptions = true)
public class ExampleCommand {
@Option(names = { "--b" }, arity = "1")
boolean booleanWithArity1;
}
Usage: <main class> [-hV] [--b=<booleanWithArity1>]
--b=<booleanWithArity1>
-h, --help Show this help message and exit.
-V, --version Print version information and exit.