建议统一修改.bashrc
在bash_profile和zsh后面追加 source ~/.bashrc
添加示例
.bashrc
# 添加PATH并自动去重
function addToPATH {
case ":$PATH:" in
*":$1:"*) :;; # already there
*) PATH="$1:$PATH";; # or PATH="$PATH:$1"
esac
}
addToPATH /Applications/AIRSDK_Compiler/bin
addToPATH ~/.local/lib/npm/bin