【发布时间】:2022-01-08 01:47:19
【问题描述】:
在关注these instructions更新Bash并将其设置为我在MacOS上的默认shell后,我发现它对VSCode中的集成终端没有任何影响。如图所示:
echo $0 返回 /bin/bash 而不是 /opt/homebrew/bin/bash。
和
echo $BASH_VERSION 返回 3.2.57(1)-release 而不是 5.1.12(1)-release(或更高版本)。
在 VSCode 中应用相同的指令,在 chsh 上使用 sudo 并将“终端 > 集成 > 默认配置文件:Osx”设置为“Bash”都没有任何效果。
我该如何解决这个问题?
简短说明
-
使用 Homebrew 下载最新的 Bash 版本:
brew install bash。 -
使用 Vim 将更新版本(路径:
/opt/homebrew/bin/bash)列入/etc/shells的白名单。 -
使用
chsh -s /opt/homebrew/bin/bash设置为默认shell。
【问题讨论】:
标签: bash macos visual-studio-code terminal homebrew