bashrc居然没有被自动的加载让我很吃惊, yahoo之后找到了办法如下:
I figured out this diagram by adding echo "${BASH_SOURCE[0]}"
to those scripts.
复制代码
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15+-----------------+ +------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内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复