You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
This is currently only available for pwsh
Setup
Make sure to enable proposed api terminalShellEnv on extension/code of your choice
Bring/Create extension of your choice where you can subscribe for terminal.shellIntegration event. (onDidChangeTerminalShellIntegration)
Testing
Make sure you are listening to window.onDidChangeTerminalShellIntegration.
The new proposed API and env (list of environment variables) should be available via terminal.shellIntegration.env
Create terminal, watch environment variables. Try putting some env vars in your shell init scripts and see if they show up in the list of environment variables.
Try setting environment variable directly in your terminal. Make sure you are getting updated variable show up
Try deleting/unsetting the environment variable. Make sure you are NOT seeing the deleted/unsetted environment variable.
The text was updated successfully, but these errors were encountered:
Refs: #227467
Complexity: 3
Create Issue
Thank you in advance for testing.
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.
This is currently only available for pwsh
Setup
terminalShellEnv
on extension/code of your choiceterminal.shellIntegration
event. (onDidChangeTerminalShellIntegration)Testing
window.onDidChangeTerminalShellIntegration
.terminal.shellIntegration.env
The text was updated successfully, but these errors were encountered: