1. 程式人生 > >解決OSX使用oh-my-zsh後.bash_profile自定義失效

解決OSX使用oh-my-zsh後.bash_profile自定義失效

場景描述

為了使OSX自帶的終端在使用上更加順手,便安裝了oh-my-zsh外掛,
但發現之前在.bash_profile自定義的一些內容都失效了。

問題分析

oh-my-zsh有自己的配置檔案,覆蓋了.bash_profile的內容。

解決方法

vi ~/.zshrc,在最後一行加入source ~/.bash_profile
這樣就可以”繼承”.bash_profile的配置了。
執行source ~/.zshrc,讓配置生效,重新使用,一切OK!