本文介绍了无法获取在 VSCode 中为 Shell Launcher 配置的所有 shell的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我按照

解决方案

where cmd (for cmd)

where powershell(用于 PowerShell)

where bash(对于 Git bash、WSL Bash)

以下是 64 位窗口的可能选项之一:

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

然后您可以通过快捷方式选择您需要的:

{键":ctrl+alt+s",命令":shellLauncher.launch"}

之后您可以在终端面板的列表中选择一个.

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

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

解决方案

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"
    }
]
{
    "key": "ctrl+alt+s",
    "command": "shellLauncher.launch"
}

这篇关于无法获取在 VSCode 中为 Shell Launcher 配置的所有 shell的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-30 23:56