从 ~/.zshrc 加载 ~/.bash_profile

~/.zshrc 加载 ~/.bash_profile

如果你希望 Zsh 可以读取 ~/.bash_profile 中的配置,可以在 ~/.zshrc 文件中显式地加载它。可以使用以下命令:

 
# ~/.zshrc 文件添加下面内容,写在首行
# Source ~/.bash_profile if it exists
if [ -f ~/.bash_profile ]; then source ~/.bash_profile fi
posted @ 2024-08-27 06:17  Questions张  阅读(1)  评论(0编辑  收藏  举报