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

标签 shell visual-studio-code terminal vscode-settings fish

关闭。这个问题不满足Stack Overflow guidelines .它目前不接受答案。












想改善这个问题吗?更新问题,使其成为 on-topic对于堆栈溢出。

3个月前关闭。




Improve this question




我在我的电脑上安装了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。
fish running in VS Code terminal

关于shell - 我在电脑上安装了fish shell,现在打不开VS code终端,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68985765/

相关文章:

c++ - system() 命令不起作用 C++ linux

python - 通过双击 .desktop 文件来运行 shell 脚本来启动 python 脚本

regex - 如何验证字符串是否也在 shell 脚本中以空格开头和结尾?

java - 导入 sun.security.ec 无法解析

linux - bash 中的 echo 命令行为问题

macos - 如何在 MACOS 终端中显示面包屑?

java - 如何仅使用控制台运行 java 应用程序?

Linux 脚本 : Using perl to insert record using If-Else condition

javascript - Typescript React/Redux 指南 - 如何从 js 翻译?

typescript - VS 代码和增量 Typescript 编译