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 enum
Enumeration of built-in commands provided by this class.Nested classes/interfaces inherited from interface org.jline.console.CommandRegistry
CommandRegistry.CommandSession
-
Constructor Summary
ConstructorsConstructorDescriptionBuiltins
(Path workDir, org.jline.builtins.ConfigurationPath configPath, Function<String, org.jline.reader.Widget> widgetCreator) Builtins
(Supplier<Path> workDir, org.jline.builtins.ConfigurationPath configPath, Function<String, org.jline.reader.Widget> widgetCreator) Builtins
(Set<Builtins.Command> commands, Path workDir, org.jline.builtins.ConfigurationPath configpath, Function<String, org.jline.reader.Widget> widgetCreator) Builtins
(Set<Builtins.Command> commands, Supplier<Path> workDir, org.jline.builtins.ConfigurationPath configpath, Function<String, org.jline.reader.Widget> widgetCreator) -
Method Summary
Methods inherited from class org.jline.console.impl.JlineCommandRegistry
commandDescription, commandInfo, commandOptions, compileCommandDescription, compileCommandInfo, compileCommandOptions, defaultCompleter, parseOptions
Methods inherited from class org.jline.console.impl.AbstractCommandRegistry
alias, commandAliases, commandNames, compileCompleters, doHelpDesc, getCommandMethods, hasCommand, invoke, registerCommands, registerCommands, registeredCommand, rename, saveException
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.jline.console.CommandRegistry
commandAliases, commandDescription, commandInfo, commandNames, compileCompleters, hasCommand, invoke, name
-
Constructor Details
-
Builtins
-
Builtins
public Builtins(Set<Builtins.Command> commands, Path workDir, org.jline.builtins.ConfigurationPath configpath, Function<String, org.jline.reader.Widget> widgetCreator) -
Builtins
-
Builtins
-
-
Method Details
-
setLineReader
public void setLineReader(org.jline.reader.LineReader reader)
-