Add support for flag parameters in descriptions

Fixes #55

Change one of standard command samples, to see effect on it
This commit is contained in:
Eric Bottard
2017-05-22 14:56:53 +02:00
parent 72f52c65d8
commit c7da298478
6 changed files with 78 additions and 62 deletions

View File

@@ -36,9 +36,9 @@ public class Commands {
}
@ShellMethod(help = "it's better")
public void foobar() {
@ShellMethod(help = "Shows support for boolean parameters, with arity=0")
public void shutdown(@ShellOption(arity = 0) boolean force) {
System.out.println("You passed " + force);
}
@ShellMethod(help = "something else")