Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Implements

  • StatefulWidget
  • ExtractableWidget

Index

Constructors

Properties

Accessors

Methods

Constructors

Properties

_terminalId: number = -1
closeOnDispose: boolean = true
contextMenuRenderer: ContextMenuRenderer
copyOnSelectionHandler: TerminalCopyOnSelectionHandler
deviceStatusCodes: Set<string> = ...
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 }
lastTouchEnd: undefined | TouchEvent
linkHover: HTMLDivElement
linkHoverButton: HTMLAnchorElement

The position of the terminal widget.

logger: ILogger
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.

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

Event that fires when the terminal size changed

onSizeChangedEmitter: Emitter<{ cols: number; rows: number }> = ...
onTermDidClose: Emitter<TerminalWidget> = ...
preferences: TerminalPreferences
resizeTerminal: ((...arguments: []) => Promise<void>) = ...

Type declaration

    • (...arguments: []): Promise<void>
    • Debounce promise-returning & async functions.

      example
      import pDebounce = require('p-debounce');

      const expensiveCall = async input => input;

      const debouncedFn = pDebounce(expensiveCall, 200);

      for (const i of [1, 2, 3]) {
      debouncedFn(i).then(console.log);
      }
      //=> 3
      //=> 3
      //=> 3

      Parameters

      • Rest ...arguments: []

      Returns Promise<void>

      A function that delays calling fn until after wait milliseconds have elapsed since the last time it was called.

restored: boolean = false
secondaryWindow: undefined | Window
shellCommandBuilder: ShellCommandBuilder
shellTerminalServer: ShellTerminalServerProxy
shown: boolean = false
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>
webSocketConnectionProvider: WebSocketConnectionProvider
workspaceService: WorkspaceService
LABEL: string = ...

Accessors

  • get copyOnSelection(): boolean
  • get cwd(): Promise<URI>
  • get enableCopy(): boolean
  • get enablePaste(): boolean
  • get hiddenFromUser(): boolean
  • get kind(): string
  • get lastTouchEndEvent(): undefined | TouchEvent
  • get processId(): Promise<number>
  • get terminalId(): number
  • get transient(): boolean

Methods

  • attachCustomKeyEventHandler(): void
  • attachPressEnterKeyToCloseListener(term: Terminal): void
  • attachTerminal(id: number): Promise<number>
  • clearOutput(): void
  • connectTerminalProcess(): void
  • createTerminal(): Promise<number>
  • customKeyHandler(event: KeyboardEvent): boolean
  • disableEnterWhenAttachCloseListener(): boolean
  • dispose(): void
  • doResizeTerminal(): void
  • executeCommand(commandOptions: CommandLineOptions): Promise<void>
  • 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>

  • getTerminal(): Terminal
  • getTerminalRendererType(terminalRendererType?: string): RendererType
  • hasChildProcesses(): Promise<boolean>
  • hideLinkHover(): void
  • init(): void
  • initializeLinkHover(): void
  • linkHoverMessage(message?: string): string
  • onActivateRequest(msg: Message): void
  • onAfterAttach(msg: Message): void
  • onAfterShow(msg: Message): void
  • onBeforeDetach(msg: Message): void
  • onCloseRequest(msg: Message): void
  • onDispose(onDispose: (() => void)): void
  • onFitRequest(msg: Message): void
  • onResize(msg: ResizeMessage): void
  • onUpdateRequest(msg: Message): void
  • open(): void
  • processMessage(msg: Message): void
  • reconnectTerminalProcess(): Promise<void>
  • resetTerminal(): void
  • resize(cols: number, rows: number): void
  • resizeTerminalProcess(): void
  • restoreState(oldState: object): void
  • scrollLineDown(): void
  • scrollLineUp(): void
  • scrollPageDown(): void
  • scrollPageUp(): void
  • scrollToBottom(): void
  • scrollToTop(): void
  • selectAll(): void
  • sendText(text: string): void
  • setTitle(title: string): void
  • showLinkHover(invokeAction: ((event: MouseEvent) => void), x: number, y: number, message?: string): void
  • start(id?: number): Promise<number>
  • storeState(): object
  • waitOnExit(waitOnExit?: string | boolean): void
  • write(data: string): void
  • writeLine(text: string): void