When I create a virtual environment using Venv in Visual Studio Code--either using Cmd + Shift + P or via the command line--I notice the following prompt in the integrated Zsh terminal:
.venvusername@My-Computer-Name working-directory %
If I try to call source .venv/bin/activate, I'll see the following:
(.venv) .venvusername@My-Computer-Name working-directory %
If I deactivate twice and then activate, I'll notice an expected and familiar terminal prompt:
(.venv) vusername@My-Computer-Name working-directory %
This doesn't last, however, if I close out of VS Code and open my working directory again. I'll see the prompt I shared at the beginning. This also only seems to be an issue in VS Code. It doesn't happen if I activate my virtual environment in a Terminal outside of the VS Code. I'm wondering two things: (1) is this behavior normal and can I just disregard it, and (2) how do I ensure that the prompt with .venv in parentheses persists?
For context, I'm working on a Mac and have already tried analyzing .venv/bin/activate. It looks as expected on the line where PS1="(.venv) ${PS1:-}"
. Any help on this or insight is appreciated. I've also looked at the User Settings JSON and don't see anything unexpected there.