Terminal UI widget.

Hierarchy (view full)

Implements

  • StatefulWidget
  • ExtractableWidget
  • EnhancedPreviewWidget

Constructors

Properties

Accessors

Methods

Constructors

Properties

_markdownRenderer: undefined | MarkdownRenderer
_terminalId: number = -1
closeOnDispose: boolean = true
colorRegistry: ColorRegistry
connectionProvider: ServiceConnectionProvider
contextMenuRenderer: ContextMenuRenderer
copyOnSelectionHandler: TerminalCopyOnSelectionHandler
deviceStatusCodes: Set<string> = ...
enhancedPreviewNode: undefined | Node
exitStatus: undefined | TerminalExitStatus
fitAddon: FitAddon
id: string
initialData: string = ''
isAttachedCloseListener: boolean = false
isExtractable: boolean = true
lastCwd: URI = ...

The last CWD assigned to the terminal, useful when attempting getCwdURI on a task terminal fails

lastMousePosition: undefined | {
    x: number;
    y: number;
}

Type declaration

  • x: number
  • y: number
lastTouchEnd: undefined | TouchEvent
linkHover: HTMLDivElement
linkHoverButton: HTMLAnchorElement

The position of the terminal widget.

logger: ILogger
markdownRendererFactory: MarkdownRendererFactory
needsResize: boolean = true
onData: Event<string> = ...

Event that fires when the terminal input data

onDataEmitter: Emitter<string> = ...
onDidOpen: Event<void> = ...

Event that fires when the terminal is connected or reconnected

onDidOpenEmitter: Emitter<void> = ...
onDidOpenFailure: Event<void> = ...

Event that fires when the terminal fails to connect or reconnect

onDidOpenFailureEmitter: Emitter<void> = ...
onKey: Event<{
    domEvent: KeyboardEvent;
    key: string;
}> = ...

Event that fires when the terminal receives a key event.

Type declaration

  • domEvent: KeyboardEvent
  • key: string
onKeyEmitter: Emitter<{
    domEvent: KeyboardEvent;
    key: string;
}> = ...

Type declaration

  • domEvent: KeyboardEvent
  • key: string
onMouseEnterLinkHover: Event<MouseEvent> = ...
onMouseEnterLinkHoverEmitter: Emitter<MouseEvent> = ...
onMouseLeaveLinkHover: Event<MouseEvent> = ...
onMouseLeaveLinkHoverEmitter: Emitter<MouseEvent> = ...
onOutput: Event<string> = ...
onOutputEmitter: Emitter<string> = ...
onSizeChanged: Event<{
    cols: number;
    rows: number;
}> = ...

Event that fires when the terminal size changed

Type declaration

  • cols: number
  • rows: number
onSizeChangedEmitter: Emitter<{
    cols: number;
    rows: number;
}> = ...

Type declaration

  • cols: number
  • rows: number
onTermDidClose: Emitter<TerminalWidget> = ...
preferences: TerminalPreferences
resizeTerminal: ((...arguments) => Promise<void>) = ...

Type declaration

    • (...arguments): Promise<void>
    • Parameters

      • Rest ...arguments: []

      Returns Promise<void>

restored: boolean = false
secondaryWindow: undefined | Window
shellCommandBuilder: ShellCommandBuilder
shellTerminalServer: ShellTerminalServerProxy
shown: boolean = false
styleElement: undefined | HTMLStyleElement
term: Terminal
termOpened: boolean = false
terminalContributionProvider: ContributionProvider<TerminalContribution>
terminalKind: string = 'user'
terminalSearchBoxFactory: TerminalSearchWidgetFactory
terminalService: TerminalService
terminalWatcher: TerminalWatcher
themeService: TerminalThemeService
toDisposeOnConnect: DisposableCollection = ...
waitForConnection: undefined | Deferred<Channel>
workspaceService: WorkspaceService
LABEL: string = ...

Accessors

  • get envVarCollectionDescriptionsByExtension(): Promise<Map<string, (undefined | string | MarkdownString)[]>>
  • The ids of extensions contributing to the environment of this terminal mapped to the provided description for their changes.

    Returns Promise<Map<string, (undefined | string | MarkdownString)[]>>

Methods

  • Resolves when the command is successfully sent, this doesn't mean that it was evaluated. Might reject if terminal wasn't properly started yet.

    Note that this method will try to escape your arguments as if it was someone inputting everything in a shell.

    Supported shells: bash, cmd.exe, wsl.exe, pwsh/powershell.exe

    Parameters

    • commandOptions: CommandLineOptions

    Returns Promise<void>