That works but a more generic solution is to use direnv to invoke shells automatically and then set up vscode to import its environments with e.g. GitHub - direnv/direnv-vscode: unclutter your .profile
1 Like