Skip to content

Allow extensions to access all terminals - #47678

Merged
Daniel Imms (Tyriar) merged 7 commits into
masterfrom
tyriar/api_terminals
Apr 12, 2018
Merged

Daniel Imms (Tyriar) merged 7 commits into
masterfrom
tyriar/api_terminals

Conversation

@Tyriar

Copy link
Copy Markdown
Contributor

New proposed APIs:

export namespace window {
	/**
	 * The currently active terminals or an empty array.
	 *
	 * @readonly
	 */
	export let terminals: Terminal[];

	/**
	 * An [event](#Event) which fires when a terminal has been created, either through the
	 * [createTerminal](#window.createTerminal) API or commands.
	 */
	export const onDidOpenTerminal: Event<Terminal>;
}

Changes to existing behavior:

  • Terminal.name and Terminal.processId can be accessed on a disposed terminal

See usage example at https://github.com/Microsoft/vscode-extension-samples/blob/master/terminal-sample/src/extension.ts

Fixes #13267
Part of #46192

/cc Dirk Bäumer (@dbaeumer) Andre Weinand (@weinand) Ilya Biryukov (@IlyaBiryukov) Alex Panov (@alpaix)

* An [event](#Event) which fires when a terminal has been created, either through the
* [createTerminal](#window.createTerminal) API or commands.
*/
export const onDidOpenTerminal: Event<Terminal>;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Think about a TerminalOpenEvent so that you a chance of adding more stuff in the future..

@jrieken Johannes Rieken (jrieken) Apr 12, 2018 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then, should open come with close?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missed that 🤦‍♂️

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Different file 😉

@Tyriar
Daniel Imms (Tyriar) merged commit 52267c0 into master Apr 12, 2018
@Tyriar
Daniel Imms (Tyriar) deleted the tyriar/api_terminals branch April 12, 2018 16:25
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow extensions to access all terminals via API

2 participants