更新了MacOS Catalina之后打開終端會(huì)出現(xiàn)下面的提示
image.png
據(jù)官方說,從 macOS Catalina 版開始,您的 Mac 將使用 zsh 作為默認(rèn)登錄 Shell 和交互式 Shell。您還可以在較低版本的 macOS 中將 zsh 設(shè)置為默認(rèn) Shell。
運(yùn)行chsh -s /bin/zsh
之后,發(fā)現(xiàn)flutter的命令不能用了,這是因?yàn)榍袚Q了shell執(zhí)行工具
image.png
解決方法也很簡單
- 單次解決辦法
這種方法,只對(duì)當(dāng)前終端窗口有效,關(guān)閉之后無效了
source ~/.bash_profile
- 永久解決方法
復(fù)制一份.bash_profile,然后改名為.zprofile,終端執(zhí)行source ~./zprofile
source ~/.zprofile
之后就又可以愉快的玩耍了