Class InteractiveCommandGroup

java.lang.Object
org.jline.builtins.InteractiveCommandGroup
All Implemented Interfaces:
CommandGroup

public class InteractiveCommandGroup extends Object implements CommandGroup
A CommandGroup that wraps interactive builtins (nano, less, tmux, ttop) as shell Commands.

These commands require a terminal and are typically used in interactive sessions.

Example:

 dispatcher.addGroup(new InteractiveCommandGroup());
 dispatcher.execute("nano file.txt");
 
Since:
4.0
  • Constructor Details

    • InteractiveCommandGroup

      public InteractiveCommandGroup()
      Creates a new InteractiveCommandGroup with all available interactive commands.
  • 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