Class JLineShellAutoConfiguration
java.lang.Object
org.springframework.shell.core.autoconfigure.JLineShellAutoConfiguration
@AutoConfiguration
@EnableConfigurationProperties(SpringShellProperties.class)
@ConditionalOnClass(org.jline.reader.History.class)
@ImportAutoConfiguration(classes={ThemingAutoConfiguration.class,TerminalUIAutoConfiguration.class,ComponentFlowAutoConfiguration.class})
public class JLineShellAutoConfiguration
extends Object
Shell implementation using JLine to capture input and trigger completions.
- Author:
- Eric Bottard, Florent Biville, Mahmoud Ben Hassine, Piotr Olaszewski
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class -
Constructor Summary
ConstructorsConstructorDescriptionJLineShellAutoConfiguration(org.jline.reader.History jLineHistory, SpringShellProperties springShellProperties, UserConfigPathProvider userConfigPathProvider) -
Method Summary
Modifier and TypeMethodDescriptioncommandCompleter(CommandRegistry commandRegistry) commandHighlighter(CommandRegistry commandRegistry) historyCommand(org.jline.reader.History jLineHistory) inputProvider(org.jline.reader.LineReader lineReader, PromptProvider promptProvider) jlineShellRunner(JLineInputProvider inputProvider, CommandParser commandParser, CommandRegistry commandRegistry, org.springframework.core.env.Environment environment) org.jline.reader.LineReaderlineReader(org.jline.terminal.Terminal terminal, org.jline.reader.Parser parser, CommandCompleter commandCompleter, CommandHighlighter commandHighlighter) voidonContextClosedEvent(org.springframework.context.event.ContextClosedEvent event) org.jline.reader.Parserparser()org.jline.terminal.Terminalterminal(org.springframework.beans.factory.ObjectProvider<TerminalCustomizer> customizers)
-
Constructor Details
-
JLineShellAutoConfiguration
public JLineShellAutoConfiguration(org.jline.reader.History jLineHistory, SpringShellProperties springShellProperties, UserConfigPathProvider userConfigPathProvider)
-
-
Method Details
-
onContextClosedEvent
@EventListener public void onContextClosedEvent(org.springframework.context.event.ContextClosedEvent event) throws IOException - Throws:
IOException
-
jlineShellRunner
@Bean @ConditionalOnProperty(prefix="spring.shell.interactive", name="enabled", havingValue="true", matchIfMissing=true) public ShellRunner jlineShellRunner(JLineInputProvider inputProvider, CommandParser commandParser, CommandRegistry commandRegistry, org.springframework.core.env.Environment environment) -
lineReader
@Bean public org.jline.reader.LineReader lineReader(org.jline.terminal.Terminal terminal, org.jline.reader.Parser parser, CommandCompleter commandCompleter, CommandHighlighter commandHighlighter) -
inputProvider
@Bean public JLineInputProvider inputProvider(org.jline.reader.LineReader lineReader, PromptProvider promptProvider) -
terminal
@Bean(destroyMethod="close") public org.jline.terminal.Terminal terminal(org.springframework.beans.factory.ObjectProvider<TerminalCustomizer> customizers) -
promptProvider
-
parser
@Bean public org.jline.reader.Parser parser() -
commandHighlighter
@Bean @ConditionalOnMissingBean public CommandHighlighter commandHighlighter(CommandRegistry commandRegistry) -
commandCompleter
@Bean @ConditionalOnMissingBean public CommandCompleter commandCompleter(CommandRegistry commandRegistry) -
historyCommand
@Bean @ConditionalOnProperty(value="spring.shell.command.history.enabled", havingValue="true", matchIfMissing=true) public Command historyCommand(org.jline.reader.History jLineHistory)
-