Class TerminalExperimental

Jay Mathis code@mathis.network (https://github.com/mathiscode)

The Terminal class extends xterm.js to support ecmaOS-specific functionality.

Implements
  • Terminal
Hierarchy
  • Terminal
    • Terminal

Constructors

Accessors

  • get promptTemplate(): string
  • Experimental

    Get/set prompt template

    Returns string

  • set promptTemplate(value: string): void
  • Experimental

    Get/set prompt template

    Parameters

    • value: string

    Returns void

Methods

  • Experimental

    Create a special terminal link

    Parameters

    • uri: string

      Link URI

    • text: string

      Link text

    Returns string

  • Experimental

    Writes text to the terminal, performing the necessary transformations for pasted text.

    Parameters

    • Optionaldata: string

      The text to write to the terminal.

    Returns Promise<void>

  • Experimental

    Get terminal prompt

    Parameters

    • text: string = ...

      Prompt text

    Returns string

  • Experimental

    Read a line of input

    Parameters

    • prompt: string = ''

      Input prompt

    • hide: boolean = false

      Hide input

    • noListen: boolean = false

      Don't auto-listen

    Returns Promise<string>

  • Experimental

    Restore terminal command

    Parameters

    • cmd: string

      Command to restore

    Returns void

  • Experimental

    Create a spinner

    Parameters

    • spinner: SpinnerName

      Spinner type

    • Optionalprefix: string

      Prefix text

    • Optionalsuffix: string

      Suffix text

    Returns Spinner

  • Experimental

    Write data to the terminal.

    Parameters

    • data: string | Uint8Array

      The data to write to the terminal. This can either be raw bytes given as Uint8Array from the pty or a string. Raw bytes will always be treated as UTF-8 encoded, string data as UTF-16.

    Returns void

  • Experimental

    Writes data to the terminal, followed by a break line character (\n).

    Parameters

    • data: string | Uint8Array

      The data to write to the terminal. This can either be raw bytes given as Uint8Array from the pty or a string. Raw bytes will always be treated as UTF-8 encoded, string data as UTF-16.

    Returns void