input-terminal
    Preparing search index...

    Class TermHistory

    Manages the terminal's history of commands.

    Index

    Constructors

    Accessors

    Methods

    Constructors

    Accessors

    Methods

    • Resets the index to the beginning of the history.

      Returns void

    • Retrieves the active item at the current index in the terminal's history.

      Returns undefined | ExitObject

      the item at the current index in the terminal's history; if no item is active, returns undefined

    • Removes the first item from the terminal's history.

      Returns undefined | ExitObject

      the popped item; if the history is empty, returns undefined

    • Adds an item (or list of items) to the beginning of the terminal's history.

      Parameters

      Returns number

      the new length of the history

    • Shifts the history index to the previous item in the terminal's history.

      Returns undefined | null | ExitObject

      the previous item in the terminal's history; if no items are in the history returns undefined, and if it is on the last item in the history returns null

    • Shifts the history index to the next item in the terminal's history.

      Returns undefined | ExitObject

      the next item in the terminal's history; if no item is available or you are on the first item in the history returns undefined