终端似乎没有自动通过.profile

时间:2012-04-30 08:51:00

标签: macos terminal

我最近添加了一些别名和.bash_profile函数。但我注意到我的mac终端没有自动加载.profile文件,因此别名不起作用。

我重新启动了终端和mac本身。

我可以通过这样做来实现它,但这是一个很糟糕的工作:

. .profile

任何人都有此之前/知道如何解决这个问题。

我的.profile文件包含以下内容:

export CLICOLOR=1
export LSCOLORS=GxFxCxDxBxegedabagaced

alias testsite="cd /Applications/MAMP/htdocs/testsite/"
alias mamp="cd /Applications/MAMP/"
alias htdocs="cd /Applications/MAMP/htdocs/"
alias deploy="git push"
alias deploymaster="git push parent master"
alias pullmaster="git pulll parent master"

1 个答案:

答案 0 :(得分:17)

.bash_profile会覆盖.profile,所以我添加的内容必须添加到.bash_profile中,这样做完成后才能完美运行。