【发布时间】:2021-09-05 03:37:19
【问题描述】:
我正在尝试将 GitBash 作为选项插入 Visual Studio Code。我的设置如下所示:
"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"
但是,在最后一行,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.
我不明白我哪里出错了。
注意:"terminal.integrated.shell.windows" 自 2021 年 4 月起已弃用。
【问题讨论】:
标签: visual-studio-code terminal git-bash