input-terminal
    Preparing search index...

    An executable command that can be added to a terminal's command list.

    Index

    Constructors

    Accessors

    Methods

    Constructors

    • Parameters

      • key: string

        the key used to identify the command

      • action: (
            args: (string | number | boolean)[],
            options: Options,
            terminal: Terminal,
        ) => any

        the function to execute when the command is run

      Returns Command

    Accessors

    • get key(): string

      Get the key used to identify the command.

      Returns string

    • get action(): (
          args: (string | number | boolean)[],
          options: Options,
          terminal: Terminal,
      ) => {}

      Get the function to execute when the command is run.

      Returns (
          args: (string | number | boolean)[],
          options: Options,
          terminal: Terminal,
      ) => {}

    • get manual(): undefined | string

      Get the manual for the command.

      Returns undefined | string

    • set manual(manual: string): void

      Set the manual for the command.

      Parameters

      • manual: string

        the manual for the command

      Returns void

    Methods

    • Parses an input array into an ArgsOptions object.

      Parameters

      • userInput: string[]

        the input array to parse

      Returns ArgsOptions

      the parsed input

    • Runs the command with the given input.

      Parameters

      • userInput: string[]

        the input array to parse

      • rawInput: string

        the raw input that was used to execute the command

      • term: Terminal

        the terminal to run the command in

      Returns ExitObject

      the ExitObject the command returns