I am using Spring-Shell 4.0.3.
When defining a command via annotations the (implicit) -help-Option does not include a default-value:
@CommandGroup(name = "samples", prefix = "samples")
@Component
public class SampleCommand {
@Command(
name = "foo",
description = "Description of 'foo'",
help = "Help of 'foo'")
public void foo(
@Argument(index = 0, description = "The desc of value") int value,
@Option String name) {
System.out.println("do it : " + name);
System.out.println("value: " + value);
}
@Command(
name = "bar",
description = "Description of 'bar'",
help = "Help of 'bar'")
public void bar(
@Arguments List<Integer> values,
@Option String name) {
System.out.println("do it : " + name);
System.out.println("values: " + values);
}
}
When running samples bar --help I get an error message:
wdc:>samples bar --help
Error while parsing command: Option '--help' requires a value
When running samples bar --help true the help will be displayed.
I am using Spring-Shell 4.0.3.
When defining a command via annotations the (implicit) -help-Option does not include a default-value:
When running
samples bar --helpI get an error message:When running
samples bar --help truethe help will be displayed.