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

Test: TerminalExitStatus.reason proposed API #154809

Closed
3 tasks done
Tyriar opened this issue Jul 11, 2022 · 1 comment
Closed
3 tasks done

Test: TerminalExitStatus.reason proposed API #154809

Tyriar opened this issue Jul 11, 2022 · 1 comment

Comments

@Tyriar
Copy link
Member

Tyriar commented Jul 11, 2022

Refs: #130231

Complexity: 2
Authors: @Tyriar, @meganrogge

Create Issue


Test this new extension API by checking Terminal.exitStatus.reason after exiting a terminal in different ways. The terminal doesn't necessarily need to be created by an extension

declare module 'vscode' {

	// https://github.com/microsoft/vscode/issues/130231

	/**
	 * Terminal exit reason kind.
	 */
	export enum TerminalExitReason {
		/**
		 * Unknow reason.
		 */
		Unknown = 0,

		/**
		 * The window closed/reloaded.
		 */
		Shutdown = 1,

		/**
		 * The shell process exited.
		 */
		Process = 2,

		/**
		 * The user closed the terminal.
		 */
		User = 3,

		/**
		 * An extension disposed the terminal.
		 */
		Extension = 4,
	}

	export interface TerminalExitStatus {
		/**
		 * The reason that triggered the exit of a terminal.
		 */
		readonly reason: TerminalExitReason;
	}

}
@Tyriar Tyriar added this to the July 2022 milestone Jul 11, 2022
@connor4312 connor4312 removed their assignment Jul 26, 2022
@aeschli aeschli removed their assignment Jul 27, 2022
@luabud luabud removed their assignment Jul 28, 2022
@luabud
Copy link
Member

luabud commented Jul 28, 2022

I wasn't able to generate the test unknown case but other than that, looked great to me :)

@luabud luabud closed this as completed Jul 28, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Sep 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants