From :
1、官方资源和github地址信息
2、安装方法
2.1 mac自带了zsh,需要更新
brew install zsh zsh-completions
2.2 set up zsh as default(把zsh设置成默认shell)
#设置
chsh -s $(which zsh)
#查检-需要关闭终端重新打开后生效
echo $SHELL
2.3 安装 oh my zsh
这里需要注意zsh是安装oh my zsh 的Prerequisites(前置条件)
2.3.1 下载oh my zsh到~/.oh-my-zsh
1、通过curl方式安装:
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
2、通过wget方式安装
sh -c "$(wget -O- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
或者
先fork https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh 到自己目录。
git clone https://github.com/BeckAgora/ohmyzsh.git ~/.oh-my-zsh
2.3.2 zshrc的配置信息【来自模板】
vi ~/.zshrc
#内容从这个模板来
cat ~.oh-my-zsh/templates/zshrc.zsh-template > ~/.zshrc
#记得最后
source ~/.zshrc
## 2.4 安装 oh my zsh的plugins
### 2.4.1下载插件到/.oh-my-zsh/custom目录中
git clone https://gitee.com/null_454_5218/zsh-autosuggestions.git $ZSH_CUSTOM/plugins/zsh-autosuggestions
### 2.4.2 配置文件中,添加支持的插件
For example, this might begin to look like this:
plugins=(
git
zsh-autosuggestions
bundler
dotenv
osx
rake
rbenv
ruby
)
网友评论