Closed
Description
For #11039
Getting activated environment variables from conda
Get activated environment variables for each shell.
- Variables for each shell might be different. For eg. the prompt variable.
- Shell path to conda for each shell might be different. For eg. cmd might be
conda init
already but powershell might not be.
Diff is another option. Can we use diff for cmd in powershell, and add the prompt variable ourselves?
Use environment variable collection to activate terminals
Blockers: microsoft/vscode#99878 on macOS
- Handling the debugger
python
config scenario- Which one takes precedence: environment var collection or env vars run in terminal request or envs supplied when creating terminal
- Kind of like internal console, except for rc and profile scripts?
- createTerminal(env) overrides environment variable collection and env in runinterminal request also affects the terminal.
- Cleanup collection prompt
Also there are some meaningless changes: liketrue
to1
.
Instead of this would it make more sense to user to just say: Terminal needed to be restarted to apply results of<conda command>
: Allow to provide description to environment collection API vscode#171108
Some other alternatives:
What about multiroot workspaces?
Environment variable collection for a workspace?
Clarify what:
Note that an extension can only make a single change to any one variable, so this will overwrite any previous calls to replace, append or prepend.
means.
Relaunch terminal doesn't show up always.
on did change default shell event? microsoft/vscode#160694 (comment)
onDidOpenTerminal and vscode.env.shell
: microsoft/vscode#171164
- Progress notification and activating terminals when an interpreter is changed.
- Check with Conda team if relying on environment vars is sufficient. For eg. scripts could potentially set shell aliases as well.
- It probably doesn't make sense to have
python.terminal.activateinterminl
settings if we aren't sending commands. - on did change default shell event?
vscode.env.shell
might return empty string to extension if fetched very soon after startup vscode#160694 (comment) - Follow up with VSCode regarding Provide
onDidChangeShell
event which is fired when default terminal profile changes vscode#171164 (comment) - Disable it for multiroot workspaces
- Add it behind experiment
- Get conda binary for a different shell than cmd.
- Create exp on control tower
- Handle debugger python scenario
- cmd to powershell conda.ts bug
- Only use cmd as a fallback if powershell fails
- Look into git bash in windows