-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Setting environment in terminal the new way not working with fish #22429
Comments
Thanks for the bug report! We just wanted to quickly acknowledge we received it and we will triage this as soon as we can. |
Meanwhile, can you run these commands in either bash or fish terminal as stated below each command:
and paste the output. Also, hover over the terminal name and click "Show environment contributions" when fish is selected, let us know what you see. |
Running that actually activates the venv. output fish
This seems to yield the same output. In the OUTPUT tab it actually now says It makes sense, because there is no binary "python" on my system, only python3 and versions of python3. output fish
Here it surprised me that "SHELL": "/usr/bin/fish", but output bash
Show environment contributions content
|
Thanks for the prompt response. The terminal (I assume fish) for which you mentioned that
According to "Show environment contributions content" you sent, |
The output of
The venv's path is missing from it. Running the first command from my last comment prepends the venv's bin path to the PATH. |
Are you overriding/editing It seems you're running into the limitation of automatic shell integration with remote: https://code.visualstudio.com/docs/terminal/shell-integration#_automatic-script-injection. Try doing the manual installation: https://code.visualstudio.com/docs/terminal/shell-integration#_manual-installation. |
I have been commenting/uncommenting the if status is-interactive
# Commands to run in interactive sessions can go here
starship init fish | source
end starship is a customized prompt. I checked if starship caused issues in I will try the manual installation tomorrow and report if it fixes my issue. |
I tried the manual installation: https://code.visualstudio.com/docs/terminal/shell-integration#_manual-installation It changed nothig. This is annoying, but does not seem to be a problem with vscode or the python plugin. I will close this issue and drop either fish or starship from my terminal setup going forward. Thanks. |
Type: Bug
Behaviour
Expected vs. Actual
After #11039 the venv is not applied in integrated terminal when running fish.
Opening a new bash terminal and running "which python" leads to expected output. Doing the same in fish does not.
Steps to reproduce:
Open new terminal with fish shell.
Run "which python". Output: system python
Diagnostic data
python.languageServer
setting: PylanceOutput for
Python
in theOutput
panel (View
→Output
, change the drop-down the upper-right of theOutput
panel toPython
)User Settings
Extension version: 2023.20.0
VS Code version: Code 1.84.0 (d037ac076cee195194f93ce6fe2bdfe2969cc82d, 2023-11-01T11:29:04.398Z)
OS version: Windows_NT x64 10.0.19045
Modes:
Remote OS version: Linux x64 5.15.90.1-microsoft-standard-WSL2
A/B Experiments
The text was updated successfully, but these errors were encountered: