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

[vscode] Support Terminal#creationOptions #11138 #11623

Conversation

jfaltermeier
Copy link
Contributor

@jfaltermeier jfaltermeier commented Aug 31, 2022

What it does

Saves the passed terminal creation options and exposes them via Terminal#creationOptions

Fixes #11138

Contributed on behalf of STMicroelectronics

How to test

I have prepares a small sample extension using the API.
This is available here: https://github.com/jfaltermeier/vscode-playground/releases/download/terminal-creation-options.0.0.5/terminal-creation-options-0.0.5.vsix
Source code: https://github.com/jfaltermeier/vscode-playground/blob/main/terminal-creation-options/src/extension.ts

This extension adds commands to create terminals using the different available vscode.window.createTerminal-methods.
Also the creationOptions of all open terminals may get logged:

ksnip_20220831-104140

For regular terminals the creationOptions will be written into the newly created terminal.
For the pseudo terminal you have to check the logs.

Output of "Print all terminal options" with the three terminals from the extension:

2022-08-31T09:26:38.193Z root INFO [hosted-plugin: 147603] {"name":"Terminal 2","isTransient":true,"pty":{}}
2022-08-31T09:38:33.696Z root INFO [hosted-plugin: 147603] {"name":"Terminal 0"}
2022-08-31T09:38:33.696Z root INFO [hosted-plugin: 147603] {"name":"Terminal 1","isTransient":true,"env":{"ENV1":"env one"}}

Review checklist

Reminder for reviewers

@vince-fugnitto vince-fugnitto added terminal issues related to the terminal vscode issues related to VSCode compatibility labels Aug 31, 2022
Copy link
Member

@vince-fugnitto vince-fugnitto left a comment

Choose a reason for hiding this comment

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

I confirm that the changes work well with the test extension 👍
I only have a minor suggestion.

Signed-off-by: Johannes Faltermeier <[email protected]>
Co-authored-by: Vincent Fugnitto <[email protected]>

Contributed on behalf of STMicroelectronics
@jfaltermeier jfaltermeier force-pushed the 11138-terminalCreationOptions branch from 5bde996 to 4b464e2 Compare September 1, 2022 07:50
@jfaltermeier
Copy link
Contributor Author

I confirm that the changes work well with the test extension +1 I only have a minor suggestion.

Thanks, I've integrated the change

Copy link
Member

@msujew msujew left a comment

Choose a reason for hiding this comment

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

Looks good to me 👍

Copy link
Member

@vince-fugnitto vince-fugnitto left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@jfaltermeier jfaltermeier merged commit 9e5db77 into eclipse-theia:master Sep 1, 2022
@JonasHelming JonasHelming added this to the 1.30.0 milestone Sep 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
terminal issues related to the terminal vscode issues related to VSCode compatibility
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[vscode] Support Terminal#creationOptions
4 participants