This version is still in development and is not considered stable yet. For the latest stable version, please use Spring Shell 4.0.3!

Option Help

It’s common in many CLI frameworks for every command having options --help and -h to print out command help. Spring Shell has a built-in help command.

Extensions of AbstractCommand will get help functionality (ie handling options --help and -h), which if present in a given command will automatically short circuit command execution into an existing help command regardless what other command-line options are typed.

Both ways of asking for the help of a command, <command> --help (or <command> -h) and help <command>, render the same message. It reports the name and the description of the command, its synopsis, and its options, arguments and aliases, if any.

The help attribute of a command is reported as the DESCRIPTION section of that message and is omitted when the command does not define one. Unlike description, which is a one liner shown in the list of available commands, help is meant to be a longer explanation of what the command does.