Package org.jline.shell.impl
Class VariableCommands
java.lang.Object
org.jline.shell.impl.VariableCommands
- All Implemented Interfaces:
CommandGroup
Built-in commands for managing session variables:
set, unset, and export.
set— list all session variables, or set one (set NAME=VALUEorset NAME VALUE)unset NAME— remove a session variableexport NAME=VALUE— same asset NAME=VALUE
- Since:
- 4.0
-
Constructor Details
-
VariableCommands
public VariableCommands()Creates a new VariableCommands group.
-
-
Method Details
-
name
Description copied from interface:CommandGroupReturns the name of this command group.The default implementation returns the simple class name.
- Specified by:
namein interfaceCommandGroup- Returns:
- the group name
-
commands
Description copied from interface:CommandGroupReturns all commands in this group.- Specified by:
commandsin interfaceCommandGroup- Returns:
- the collection of commands, never null
-
command
Description copied from interface:CommandGroupFinds a command by name or alias.The default implementation scans
CommandGroup.commands()for a match.- Specified by:
commandin interfaceCommandGroup- Parameters:
name- the command name or alias- Returns:
- the command, or null if not found
-