Package org.jline.console.impl
Class Builtins
java.lang.Object
org.jline.console.impl.AbstractCommandRegistry
org.jline.console.impl.JlineCommandRegistry
org.jline.console.impl.Builtins
- All Implemented Interfaces:
CommandRegistry
Implementation of CommandRegistry that provides built-in commands for JLine.
The Builtins class provides a set of common commands that are useful in any JLine-based console application, such as:
- File editing (nano)
- File viewing (less)
- Command history management
- Widget and keymap configuration
- Terminal and system information display
This class creates tab completers, executes commands, and provides descriptions for these built-in commands.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumEnumeration of built-in commands provided by this class.Nested classes/interfaces inherited from interface org.jline.console.CommandRegistry
CommandRegistry.CommandSession -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionBuiltins(Supplier<Path> workDir, ConfigurationPath configPath, Function<String, Widget> widgetCreator) Builtins(Set<Builtins.Command> commands, Path workDir, ConfigurationPath configpath, Function<String, Widget> widgetCreator) Builtins(Set<Builtins.Command> commands, Supplier<Path> workDir, ConfigurationPath configpath, Function<String, Widget> widgetCreator) -
Method Summary
Modifier and TypeMethodDescriptionprivate voidcolors(CommandInput input) private voidhighlighter(CommandInput input) highlighterCompleter(String name) private voidhistory(CommandInput input) historyCompleter(String name) private voidkeymap(CommandInput input) private voidless(CommandInput input) lessCompleter(String name) private voidnano(CommandInput input) nanoCompleter(String name) voidsetLineReader(LineReader reader) private voidsetopt(CommandInput input) setoptCompleter(String name) private voidsetvar(CommandInput input) setvarCompleter(String name) private voidttop(CommandInput input) private voidunsetopt(CommandInput input) unsetoptCompleter(String name) unsetOptions(boolean set) private voidwidget(CommandInput input) widgetCompleter(String name) Methods inherited from class org.jline.console.impl.JlineCommandRegistry
commandDescription, commandInfo, commandOptions, compileCommandDescription, compileCommandInfo, compileCommandOptions, defaultCompleter, parseOptionsMethods inherited from class org.jline.console.impl.AbstractCommandRegistry
alias, commandAliases, commandNames, compileCompleters, doHelpDesc, getCommandMethods, hasCommand, invoke, registerCommands, registerCommands, registeredCommand, rename, saveExceptionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jline.console.CommandRegistry
commandAliases, commandDescription, commandInfo, commandNames, compileCompleters, hasCommand, invoke, name
-
Field Details
-
configPath
-
widgetCreator
-
workDir
-
reader
-
-
Constructor Details
-
Builtins
-
Builtins
public Builtins(Set<Builtins.Command> commands, Path workDir, ConfigurationPath configpath, Function<String, Widget> widgetCreator) -
Builtins
-
Builtins
public Builtins(Set<Builtins.Command> commands, Supplier<Path> workDir, ConfigurationPath configpath, Function<String, Widget> widgetCreator)
-
-
Method Details
-
setLineReader
-
less
-
nano
-
history
-
widget
-
keymap
-
setopt
-
setvar
-
unsetopt
-
ttop
-
colors
-
highlighter
-
unsetOptions
-
highlighterCompleter
-
allWidgets
-
nanoCompleter
-
lessCompleter
-
historyCompleter
-
widgetCompleter
-
setvarCompleter
-
setoptCompleter
-
unsetoptCompleter
-