'Visual Studio Code - Add option(s) in 'select default shell' list on Windows?
I want to use various shells in VSCode terminal, eg. Git Bash. I can set it in settings.json
with terminal.integrated.shell.windows
, but if I select CMD as default subsequently, that setting will get replaced. And if I add another terminal.integrated.shell.windows
to bash.exe
, I'm stuck with bash, can't change default shell, seems logical anyway if VSCode only replaces the 1st setting, but read the last same setting value.
The problem is there's no Bash existed in the "select default shell" list, and my question is how to add that?
I have installed latest (2.22.0) 64-bit version of Git for Windows, and hoped it would add the necessary env/reg etc for that, but no.
Even though this should be version independent, nevertheless here's my VSCode About:
Version: 1.35.1 (user setup)
Commit: c7d83e57cd18f18026a8162d042843bda1bcf21f
Date: 2019-06-12T14:30:02.622Z
Electron: 3.1.8
Chrome: 66.0.3359.181
Node.js: 10.2.0
V8: 6.6.346.32
OS: Windows_NT x64 10.0.10240
Please. I know there are similar questions, but they don't really solve my problem. However, the correct answer to my question will solve theirs.
Solution 1:[1]
If your question is how to add more terminal shells to Terminal:Select Default Shell
, I dont think thats easily possible.
But you can use Shell Launcher
plugin to add more shells and launch them in your integrated terminal. Below is a screen shot where I added Julia to the list.
Installation:
Solution 2:[2]
My alternative solution is to use the "terminal.external.windowsExec" setting for non-default Windows shell. But you can only have one such setting!
Solution 3:[3]
I have this same question, and have looked through all of the documentation, and every article I can find on the subject, and haven't found the answer. I found a terminal launcher extension, but that creates a separate menu. There must be a json file somewhere that has the list of choices for the Select Default Shell menu. Does anyone know how to update that menu?
I did some more testing on this. On the Mac version (and I assume the linux version), there is a file called /etc/shells that is used to determine what to put in the menu. If there is a similar file on Windows, I'm not sure what it would be called or where it would be.
Solution 4:[4]
For anyone on Linux who cannot seem to find the option at all, uninstall VS Code and reinstall the latest version from the website.
I spent so much time with the same issue but the reason was that I had installed it from the pop shop on my pop OS (Linux).
Solution 5:[5]
The Select Default Shell command just list the shells that can be found from your %PATH% environment variable. Add the shell and restart VSCode to see it.
Here is to add a new path.
Remember that you can always start a shell from another one. Just type bash
from inside CMD.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | vincent mathew |
Solution 2 | |
Solution 3 | |
Solution 4 | highDef4k |
Solution 5 | neves |