我在电脑上安装了 fish shell 现在我打不开 VS code 终端

I installed fish shell on my computer and now I can't open the VS code terminal

我在电脑上安装了fish shell,现在无法打开VS code终端

当我尝试在 VS 代码上打开终端时,出现以下错误:“终端进程启动失败:shell 可执行文件“/usr/bin/fish”的路径不存在。”

我从外部 VS 代码打开终端没有问题。 当我输入 echo "$SHELL" 命令 时,我得到 /usr/bin/fish 这正是路径VS 代码找不到。

我该如何解决这个问题? 我正在使用 ubuntu.

我遇到了同样的问题。问题是默认情况下 VSC 仅在 /usr/bin 中查找 shell。我复制了默认终端设置并将 fish 更新到 brew 安装它的位置:/usr/local/bin

"terminal.integrated.profiles.osx": {
    "bash": {
        "path": "bash",
        "args": [
            "-l"
        ],
        "icon": "terminal-bash"
    },
    "zsh": {
        "path": "zsh",
        "args": [
            "-l"
        ]
    },
    "fish": {
        "path": "/usr/local/bin/fish", // overriding
        "args": [
            "-l"
        ]
    }
},

这对于其他操作系统应该是相同的,您只需要 linux 或 windows 而不是 osx。

要进入该设置,请打开您的设置(mac 上的 cmd 逗号或其他地方的 ctrl 逗号),搜索终端配置文件: 然后点击 settings.json 中的编辑。它应该会将您带到正确的位置以粘贴这些配置文件。