Terminal

An individual terminal instance within the integrated terminal.

Online Documentation

Properties

Link copied to clipboard
abstract val creationOptions: JsAny

The object used to initialize the terminal, this is useful for example to detecting the shell type of when the terminal was not launched by this extension or for detecting what folder the shell was launched in.

Link copied to clipboard

The exit status of the terminal, this will be undefined while the terminal is active.

Link copied to clipboard
abstract val name: String

The name of the terminal.

Link copied to clipboard
abstract val processId: PromiseLike<JsInt?>

The process ID of the shell process.

Link copied to clipboard

An object that contains shell integration-powered features for the terminal. This will always be undefined immediately after the terminal is created. Listen to window.onDidChangeTerminalShellIntegration to be notified when shell integration is activated for a terminal.

Link copied to clipboard
abstract val state: TerminalState

The current state of the Terminal.

Functions

Link copied to clipboard
abstract override fun dispose()

Dispose and free associated resources.

Link copied to clipboard
abstract fun hide()

Hide the terminal panel if this terminal is currently showing.

Link copied to clipboard
abstract fun sendText(text: String, shouldExecute: Boolean = definedExternally)

Send text to the terminal. The text is written to the stdin of the underlying pty process (shell) of the terminal.

Link copied to clipboard
abstract fun show(preserveFocus: Boolean = definedExternally)

Show the terminal panel and reveal this terminal in the UI.