KEMBAR78
Handle all shells’ de/activation by flying-sheep · Pull Request #137 · microsoft/vscode-python-environments · GitHub
Skip to content

Conversation

flying-sheep
Copy link
Contributor

@flying-sheep flying-sheep commented Jan 24, 2025

Fixes #138

This adds shell activation for

  • gitbash
  • wsl
  • ksh
  • tcshell
  • xonsh
  • nushell

and fixes shell activation for C shell.

it also makes sure that it’s impossible to add a terminal to the enum without also adding shell activation/deactivation commands by using a Record type that needs to be exhaustive.

@karthiknadig
Copy link
Member

Thanks for the PR! Love the new shell command handling.

@karthiknadig karthiknadig enabled auto-merge (squash) January 25, 2025 18:52
@anthonykim1
Copy link
Contributor

anthonykim1 commented Jan 27, 2025

Thanks for doing this @flying-sheep
I mentioned #116, we should eventually start using shell type API.

The list on https://github.com/microsoft/vscode/blob/e8346324cfb8b5d680ad657bb67153eb838aebc5/src/vscode-dts/vscode.proposed.terminalShellType.d.ts are subject to change, so feel free to let me know if anyone thinks more shell types could be added to make the workload easier on the extension side. As we want to make sure to cover extensive list of shell types for their specific activation.

@vs-code-engineering vs-code-engineering bot added this to the January 2025 milestone Jan 27, 2025
@karthiknadig karthiknadig merged commit 6a69637 into microsoft:main Jan 27, 2025
6 checks passed
@flying-sheep flying-sheep deleted the pa/all-shells branch January 27, 2025 21:59
sowhat1989 referenced this pull request in sowhat1989/vscode-python-environments Oct 23, 2025
Fixes #138

This adds shell activation for

- gitbash
- wsl
- ksh
- tcshell
- xonsh
- nushell

and fixes shell activation for C shell.

it also makes sure that it’s impossible to add a terminal to the enum
without also adding shell activation/deactivation commands by using a
`Record` type that needs to be exhaustive.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Venv activation/deactivation is missing for many shell types and broken for one of the existing ones

3 participants