4

I followed the instructions from How to add multiple terminal in VS Code?

When I type Ctrl+Alt+S (my custom shortcut) only Powershell and Git Bash are listed whereas cmd and wsl not there, why are they missing ?

enter image description here

L Y E S - C H I O U K H
  • 4,765
  • 8
  • 40
  • 57
user310291
  • 36,946
  • 82
  • 271
  • 487
  • Please read [https://stackoverflow.com/questions/43427631/how-to-add-multiple-terminal-in-vs-code/50890703#50890703](https://stackoverflow.com/questions/43427631/how-to-add-multiple-terminal-in-vs-code/50890703#50890703) for complete solution. – AKS Jun 16 '18 at 18:52

1 Answers1

7

You use the incorrect paths in extension settings!

You can find the necessary paths by running the following commands in the windows console (cmd):

where cmd (for cmd)

where powershell (for PowerShell)

where bash (for Git bash, WSL Bash)

Here is one of the possible options for a 64 bit windows:

"shellLauncher.shells.windows": [
    {
      "shell": "C:\\Windows\\SysWOW64\\cmd.exe",
      "label": "cmd"
    },
    {
      "shell": "C:\\Windows\\SysWOW64\\WindowsPowerShell\\v1.0\\powershell.exe",
      "label": "PowerShell"
    },
    {
      "shell": "C:\\Program Files\\Git\\bin\\bash.exe",
      "label": "Git bash"
    },
    {
      "shell": "C:\\Windows\\System32\\bash.exe",
      "label": "WSL Bash"
    }
]

Then you can select the one you need with via a shortcut:

{
    "key": "ctrl+alt+s",
    "command": "shellLauncher.launch"
}

After that you can select one in the list in the terminal panel.

Community
  • 1
  • 1
Victor S.
  • 2,510
  • 3
  • 22
  • 35
  • Thanks, what was my error exactly, can't see it clearly ? – user310291 Mar 10 '18 at 01:39
  • PowerShell - default shell for Windows, so it worked. Git was given right path. For WSL Bash and cmd were wrong paths specified. Sysnative (as I understand) is only an example, instead of which you need to specify the path for a particular system. Therefore it seems to me in "terminal.integrated.shell.windows" it is better to specify correct path to shell that you want to use by default. – Victor S. Mar 10 '18 at 09:27