Class Help
java.lang.Object
org.springframework.shell.standard.AbstractShellComponent
org.springframework.shell.standard.commands.Help
- All Implemented Interfaces:
org.springframework.beans.factory.Aware
,org.springframework.beans.factory.InitializingBean
,org.springframework.context.ApplicationContextAware
,org.springframework.context.ResourceLoaderAware
A command to display help about all available commands.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
Marker interface for beans providing help functionality to the shell. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.jline.utils.AttributedString
void
setCommandsTemplate
(String commandsTemplate) Sets a location for a template rendering commands help.void
setCommandTemplate
(String commandTemplate) Sets a location for a template rendering command help.void
setShowGroups
(boolean showGroups) Sets if groups should be shown in a listing, defaults to true.Methods inherited from class org.springframework.shell.standard.AbstractShellComponent
afterPropertiesSet, getApplicationContext, getCommandCatalog, getCompletionResolver, getResourceLoader, getShell, getTemplateExecutor, getTerminal, getThemeResolver, getViewComponentBuilder, setApplicationContext, setResourceLoader
-
Constructor Details
-
Help
-
-
Method Details
-
help
@ShellMethod("Display help about available commands") public org.jline.utils.AttributedString help(@ShellOption(defaultValue="__NULL__",valueProvider=CommandValueProvider.class,value={"-C","--command"},help="The command to obtain help for.",arity=2147483647) String[] command) throws IOException - Throws:
IOException
-
setCommandTemplate
Sets a location for a template rendering command help.- Parameters:
commandTemplate
- the command template location
-
setCommandsTemplate
Sets a location for a template rendering commands help.- Parameters:
commandsTemplate
- the commands template location
-
setShowGroups
public void setShowGroups(boolean showGroups) Sets if groups should be shown in a listing, defaults to true. If not enabled a simple list is shown without groups.- Parameters:
showGroups
- the flag to show groups
-