Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow extensions to access all terminals #47678

Merged
merged 7 commits into from
Apr 12, 2018
Merged

Allow extensions to access all terminals #47678

merged 7 commits into from
Apr 12, 2018

Conversation

Tyriar
Copy link
Member

@Tyriar Tyriar commented Apr 11, 2018

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 @dbaeumer @weinand @IlyaBiryukov @alpaix

@Tyriar Tyriar added this to the April 2018 milestone Apr 11, 2018
@Tyriar Tyriar self-assigned this Apr 11, 2018
@Tyriar Tyriar requested a review from jrieken April 11, 2018 17:31
* 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
Member

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..

Copy link
Member

@jrieken jrieken Apr 12, 2018

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
Member Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

missed that 🤦‍♂️

Copy link
Member Author

Choose a reason for hiding this comment

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

Different file 😉

@Tyriar Tyriar merged commit 52267c0 into master Apr 12, 2018
@Tyriar 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