-
Notifications
You must be signed in to change notification settings - Fork 30.7k
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: Terminal Shell Environment Proposed API #241722
Labels
Milestone
Comments
This was referenced Feb 25, 2025
Looks like that's just because fish isn't really available for windows except maybe through WSL |
Yeah, maybe we could add a WSL section, but not too sure since there are already |
Only |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Refs: #227467
Complexity: 5
Create Issue
Thanks in advance for testing.
I've rated this as complexity 5 due to having to cover multiple shells, but should not be technically challenging to test.
Background Information
There are times where extensions would like to know user's environment information. Meaning list of user's environment variable from various places (including shell specific init scrip such as .zshrc, etc).
I've been working on adding a proposed API here to expose such information from core => extension.
Last month, we had a TPI to test initial version of this proposed API but only for Powershell: #238896
There has been change to the API shape since then (added an isTrusted field), and addition of support for of zsh, bash, fish as well.
Setup
terminalShellEnv
on extension/code of your choiceterminal.shellIntegration
event. (onDidChangeTerminalShellIntegration)terminal.integrated.shellIntegration.enabled
Testing
For MacOS and Linux:
For Windows
window.onDidChangeTerminalShellIntegration
.terminal.shellIntegration.env
. Note there is two field forenv
, which are:terminal.shellIntegration.env.value
should get you all of the environment variablesterminal.shellIntegration.env.isTrusted
(This should be true for pwsh, bash, zsh, and false for fish)terminal.integrated.shellIntegration.environmentReporting
Try turning this off to see that you dont get theenv
object.The text was updated successfully, but these errors were encountered: