概述
bashrc居然没有被自动的加载让我很吃惊, yahoo之后找到了办法如下:
I figured out this diagram by adding echo "${BASH_SOURCE[0]}"
to those scripts.
+-----------------+ +------FIRST-------+ +-----------------+
| | | ~/.bash_profile | | |
login shell -------->| /etc/profile |-->| ~/.bash_login ------>| ~/.bashrc |
| | | ~/.profile | | |
+-----------------+ +------------------+ +-----------------+
+-----------------+ +-----------------+
| | | |
interactive shell -->| ~/.bashrc -------->| /etc/bashrc |
| | | |
+-----------------+ +-----------------+
+-----------------+
| |
logout shell ------->| ~/.bash_logout |
| |
+-----------------+
Note
-
[]-->[]
meanssource by workflow
(Automatically). -
[--->[]
meanssource by convention
(Manually. If not, nothing happen.). -
FIRST
meansfind the first available, ignore rest
what does your .bash_profile look like? I just set mine up with the following in my .bash_profile, and it's working.
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
export PS1='[e[0;31m]u[e[0m][e[1;31m]@[e[0m][e[0;31m]H[e[0m] w $ '
source ~/.bashrc
最后
以上就是美丽诺言为你收集整理的mac terminal not auto load bashrc的全部内容,希望文章能够帮你解决mac terminal not auto load bashrc所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复