首页 > 代码库 > Mac添加bash alias

Mac添加bash alias

1. vim ~/.bash_profile (无则新建)

添加

if [ -f ~/.bashrc ]; then
source ~/.bashrc
fi

2.vim ~/.bashrc (无则新建)

添加alias

如 alias workspace=‘cd ~/my/workspace‘

Mac添加bash alias