按照這些說明更新 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,使用sudo上chsh和設定“終端>集成>默認配置:OSX”,以“打擊”一切都沒有任何效果。
我該如何解決?
簡短說明
使用 Homebrew 下載最新的 Bash 版本:
brew install bash。白名單更新版本(路徑:
/opt/homebrew/bin/bash),以/etc/shells使用議會。使用
chsh -s /opt/homebrew/bin/bash.
uj5u.com熱心網友回復:
只需settings.json將以下行添加到(可以在設定中找到)以覆寫原始路徑:
// "...",
"terminal.integrated.shell.osx": "/opt/homebrew/bin/bash",
// "...",
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/373400.html
