Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Pseudoterminal

Defines the interface of a terminal pty, enabling extensions to control a terminal.

Hierarchy

  • Pseudoterminal

Index

Properties

onDidChangeName?: Event<string>

An event that when fired allows changing the name of the terminal.

Events fired before Pseudoterminal.open is called will be be ignored.

Example: Change the terminal name to "My new terminal".

const writeEmitter = new vscode.EventEmitter<string>();
const changeNameEmitter = new vscode.EventEmitter<string>();
const pty: vscode.Pseudoterminal = {
onDidWrite: writeEmitter.event,
onDidChangeName: changeNameEmitter.event,
open: () => changeNameEmitter.fire('My new terminal'),
close: () => {}
};
vscode.window.createTerminal({ name: 'My terminal', pty });
onDidClose?: Event<number | void>

An event that when fired will close the pty.

onDidOverrideDimensions?: Event<undefined | TerminalDimensions>

An event that when fired allows resizing the terminal.

onDidWrite: Event<string>

An event that when fired will write data to the terminal.

Methods

  • close(): void
  • handleInput(data: string): void