Use new vsc API to activate terminal without running any commands in terminal
See original GitHub issueContribute to terminal environments
This new API allows extensions to change environment variables when the terminal is starting up.
- Support terminal activation for debugger without running Commands in terminal
- Running
python
in terminal will user correct environment even when terminal is already open - Not polluting terminal history with unnecessary commands
- expose
.env
variables into terminal without activation of environment
const collection = window.getEnvironmentVariableCollection(true);
const separator = process.platform === 'win32' ? ';' : ':';
collection.prepend('PATH', `/foo${separator}`);
collection.replace('JAVA_HOME', '/bar');
Issue Analytics
- State:
- Created 3 years ago
- Reactions:39
- Comments:28 (14 by maintainers)
Top Results From Across the Web
Integrated Terminal in Visual Studio Code
Visual Studio Code has an integrated terminal to enable working in your shell of choice ... Use the Ctrl+Shift+` keyboard shortcut to create...
Read more >VSCode: How to run a command after each terminal open?
My development environment is VSCode, and I open a dozen new terminals each day. After each terminal open, I have to manually run...
Read more >VS Code tips —Run the current file in the integrated terminal
Use the " Run active file in terminal " command to execute the current file in VS Code's integrated terminal.Keep in mind that...
Read more >Integrated terminal - vscode-docs1
From the Command Palette ( kb(workbench.action.showCommands) ), use the View:Toggle Integrated Terminal command. Terminal. Note: You can still open an external ...
Read more >An overview on Windows Terminal | Microsoft Learn
You can set Windows Terminal to launch in a specific configuration using command line arguments. You can specify which profile to open in...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The API moved to
ExtensionContext
late last month and should be stable in 1.46.Thanks, @brettcannon. We do have one additional use case where the CLI is globally installed (could even be as a binary via
brew
for example) but the associated project uses some kind of virtual environment. Under these circumstances, we have to add the environment details toPATH
as calling the CLI with/path/to/env/interpreter/python -m dvc some command
throws an error.