Class ScriptCommands

java.lang.Object
org.jline.shell.impl.ScriptCommands
All Implemented Interfaces:
CommandGroup

public class ScriptCommands extends Object implements CommandGroup
Built-in commands for script execution.

Provides:

  • source (alias .) ? executes a script file in the current session
Since:
4.0
See Also:
  • Constructor Details

    • ScriptCommands

      public ScriptCommands(ScriptRunner scriptRunner, CommandDispatcher dispatcher)
      Creates the script commands group.
      Parameters:
      scriptRunner - the script runner to use
      dispatcher - the command dispatcher for executing script lines
  • Method Details

    • name

      public String name()
      Description copied from interface: CommandGroup
      Returns the name of this command group.

      The default implementation returns the simple class name.

      Specified by:
      name in interface CommandGroup
      Returns:
      the group name
    • commands

      public Collection<Command> commands()
      Description copied from interface: CommandGroup
      Returns all commands in this group.
      Specified by:
      commands in interface CommandGroup
      Returns:
      the collection of commands, never null