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) Terminal Shell Env Proposed API - pwsh #238896

Closed
3 tasks done
anthonykim1 opened this issue Jan 27, 2025 · 1 comment
Closed
3 tasks done

Test) Terminal Shell Env Proposed API - pwsh #238896

anthonykim1 opened this issue Jan 27, 2025 · 1 comment

Comments

@anthonykim1
Copy link
Contributor

anthonykim1 commented Jan 27, 2025

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

  1. Make sure to enable proposed api terminalShellEnv on extension/code of your choice
  2. Bring/Create extension of your choice where you can subscribe for terminal.shellIntegration event. (onDidChangeTerminalShellIntegration)

Testing

  1. Make sure you are listening to window.onDidChangeTerminalShellIntegration.
  2. The new proposed API and env (list of environment variables) should be available via terminal.shellIntegration.env
  3. 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.
  4. Try setting environment variable directly in your terminal. Make sure you are getting updated variable show up
  5. Try deleting/unsetting the environment variable. Make sure you are NOT seeing the deleted/unsetted environment variable.
@anthonykim1 anthonykim1 changed the title Test) Terminal Shell Env Proposed API Test) Terminal Shell Env Proposed API - pwsh Jan 27, 2025
@vs-code-engineering vs-code-engineering bot added this to the January 2025 milestone Jan 27, 2025
@chrmarti
Copy link
Collaborator

Currently blocked by #238950.

@karthiknadig karthiknadig removed their assignment Jan 28, 2025
@chrmarti chrmarti removed their assignment Jan 28, 2025
@lramos15 lramos15 removed their assignment Jan 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants