Class InteractiveCommandGroup

  • All Implemented Interfaces:
    CommandGroup

    public class InteractiveCommandGroup
    extends java.lang.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 Summary

      Constructors 
      Constructor Description
      InteractiveCommandGroup()
      Creates a new InteractiveCommandGroup with all available interactive commands.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Collection<Command> commands()
      Returns all commands in this group.
      java.lang.String name()
      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
    • Constructor Detail

      • InteractiveCommandGroup

        public InteractiveCommandGroup()
        Creates a new InteractiveCommandGroup with all available interactive commands.
    • Method Detail

      • name

        public java.lang.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 java.util.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