我试图在 Visual Studio Code 中插入 GitBash 作为一个选项。我的设置如下所示:
"terminal.integrated.profiles.windows": {
"PowerShell": {
"source": "PowerShell",
"icon": "terminal-powershell"
},
"Command Prompt": {
"path": [
"${env:windir}\\Sysnative\\cmd.exe",
"${env:windir}\\System32\\cmd.exe"
],
"args": [],
"icon": "terminal-cmd"
},
"GitBash": {
"source": "GitBash",
"path": ["F:\\Code\\Git\\bin\\bash.exe"],
"icon": "terminal-bash"
}
},
"terminal.integrated.defaultProfile.windows": "GitBash"
Run Code Online (Sandbox Code Playgroud)
但是,在最后一行,Visual Studio Code 给出的错误是:
Value is not accepted. Valid values: "PowerShell", "Command Prompt".(1)
The default profile used on Windows. This setting will currently be ignored if either #terminal.integrated.shell.windows# or #terminal.integrated.shellArgs.windows# are set.
Run Code Online (Sandbox Code Playgroud)
我不明白我哪里出错了。
注意:"terminal.integrated.shell.windows"自 2021 年 4 …