- java.lang.Object
-
- org.jline.shell.impl.VariableCommands
-
- All Implemented Interfaces:
CommandGroup
public class VariableCommands extends java.lang.Object implements CommandGroup
Built-in commands for managing session variables:set,unset, andexport.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 Summary
Constructors Constructor Description VariableCommands()Creates a new VariableCommands group.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Commandcommand(java.lang.String name)Finds a command by name or alias.java.util.List<Command>commands()Returns all commands in this group.java.lang.Stringname()Returns the name of this command group.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jline.shell.CommandGroup
hasCommand
-
-
-
-
Method Detail
-
name
public java.lang.String 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
public java.util.List<Command> commands()
Description copied from interface:CommandGroupReturns all commands in this group.- Specified by:
commandsin interfaceCommandGroup- Returns:
- the collection of commands, never null
-
command
public Command command(java.lang.String name)
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
-
-