Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot get all shells configured in VSCode for Shell Launcher

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

like image 438
user310291 Avatar asked Mar 07 '23 18:03

user310291


1 Answers

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.

like image 180
Victor S. Avatar answered Apr 28 '23 23:04

Victor S.