I use Spring Boot 4.0.3.
When defining a Command with the @Command-Annotation it is possible to set a "help"-text. Currently this text is displayed when using the "--help" option. But: This text is displayed without parameters, options and synopsis. Consider this case:
@CommandGroup(name = "samples", prefix = "samples")
@Component
public class SampleCommand {
@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 the output is:
But when running help samples bar this output is produced:
NAME
samples bar - Description of 'bar'
SYNOPSIS
samples bar --name String --help
OPTIONS
--name String
[Optional, default = ]
--help or -h
help for samples bar
[Optional]
In the later variant the text of the @Command.help is completely ignored. I suggest the following:
1.) The output of both "help" variants should be same - the base for that could be the help samples bar version.
2.) The @Command.help text should be integrated in that output.
I saw other issues which implicitely mentioned the same idea. This would streamline the help output.
I use Spring Boot 4.0.3.
When defining a Command with the @Command-Annotation it is possible to set a "help"-text. Currently this text is displayed when using the "--help" option. But: This text is displayed without parameters, options and synopsis. Consider this case:
When running
samples bar --helpthe output is:But when running
help samples barthis output is produced:In the later variant the text of the @Command.help is completely ignored. I suggest the following:
1.) The output of both "help" variants should be same - the base for that could be the
help samples barversion.2.) The @Command.help text should be integrated in that output.
I saw other issues which implicitely mentioned the same idea. This would streamline the help output.