shell - 我在我的电脑上安装了fish shell,现在我无法打开VS code终端
问题描述
我在我的电脑上安装了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 中的编辑。它应该带您到正确的位置粘贴这些配置文件。
推荐阅读
- bash - 来自多个 ip 的 SMBClient
- image - Flutter:如何用其他小部件包装 ImagePicker/VideoPicker?
- r - 如何在闪亮的模块中禁用和启用反应性?
- mongodb - 如何“重启”云 MongoDB Atlas 数据库
- android - 如何暂停 ListIterator
- java - 如何获取 Quantity 字段的项目数并计算 TotalTax()?
- typescript - 即使类型不匹配,打字稿也不会出错
- mysql - AWS Django Elastic Beanstalk 迁移错误
- three.js - 是否可以将立方体环境贴图围绕 Y 轴旋转 180 度?
- git - 在将发布分支合并回开发之前将开发合并到发布分支中吗?