在mac,在~/.bashrc中添加alias后不起作用,每次都需要source .bashrc后才起作用
每次都要source .bashrc
解决办法:在目录下新建~/.bash_profile文件,关闭终端重新打开就OK了
if [ "${BASH-no}" != "no" ]; then
[ -r ~/.bashrc ] && . ~/.bashrc
fi
在mac,在~/.bashrc中添加alias后不起作用,每次都需要source .bashrc后才起作用
每次都要source .bashrc
解决办法:在目录下新建~/.bash_profile文件,关闭终端重新打开就OK了
if [ "${BASH-no}" != "no" ]; then
[ -r ~/.bashrc ] && . ~/.bashrc
fi