小编Luc*_*hel的帖子

GitBash 未在 Visual Studio Code 中显示为终端选项

我试图在 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 …

terminal git-bash visual-studio-code

8
推荐指数
5
解决办法
1259
查看次数

标签 统计

git-bash ×1

terminal ×1

visual-studio-code ×1