无法获取在 VSCode 中为 Shell Launcher 配置的所有 shell [英] Cannot get all shells configured in VSCode for Shell Launcher
问题描述
我按照
您在扩展设置中使用了错误的路径!
您可以通过在 windows 控制台 (cmd) 中运行以下命令来找到所需的路径:
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 Ctrl+Alt+S (my custom shortcut) only Powershell and Git Bash are listed whereas cmd and wsl not there, why are they missing ?
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.
这篇关于无法获取在 VSCode 中为 Shell Launcher 配置的所有 shell的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!