-
Notifications
You must be signed in to change notification settings - Fork 441
Closed
Milestone
Description
Something like this:
@Command(autoHelp = true, sortOptions = false, groups = {
@OptionGroup(name = "dest", required = true, exclusive = true,
heading = "Destination: The data can be sent either to a file or to a socket"),
@OptionGroup(name = "other",
heading = "Other:%n Some other options")})
class ExclusiveOptionsExample {
@Option(names = "-f", description = "Target file", group = "dest")
File file;
@Option(names = "-s", description = "Target socket", group = "dest")
InetAddress adr;
@Option(names = "-d", description = "Data file", group = "other")
File data;
}
Usage help:
Usage: <main class> [-hV] [-d=<data>] (-f=<file> | -s=<adr>)
Destination: The data can be sent either to a file or to a socket
-f= <file> Target file
-s= <adr> Target socket
Other:
Some other options
-d= <data> Data file
-h, --help Show this help message and exit.
-V, --version Print version information and exit.
Commands:
help Displays help information about the specified command
vmesh, xaviarias, pguedes, NicolasMassart, bobtiernay-okta and 5 more