这是针对Mac的教程, Windows用户慎用喔

安装oh-my-zsh

1
2
3
4
5
6
7
# 安装 git 和 zsh 选择curl或者wget其一命令执行
yum install -y git zsh

# curl
sh -c "$(curl -fsSL https://gitee.com/Devkings/oh_my_zsh_install/raw/master/install.sh)"
# wget
sh -c "$(wget https://gitee.com/Devkings/oh_my_zsh_install/raw/master/install.sh -O -)"

修改配置文件

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
cd && cd .oh-my-zsh/plugins
# 高亮插件
git clone https://gitee.com/mirrors/zsh-syntax-highlighting.git

# 记录历史插件
git clone https://gitee.com/mirrors/zsh-autosuggestions.git

vi ~/.zshrc
# agnoster是内置主题,所以不需要安装
ZSH_THEME="agnoster"
# 找到对应位置加上zsh-syntax-highlighting zsh-autosuggestions 
plugins=(zsh-syntax-highlighting zsh-autosuggestions git)
# 第一个是隐藏用户(有些主题会隐藏,agnoster内置主题不会隐藏)
DEFAULT_USER="sliverhorn"

# 使.zshrc配置文件生效
source ~/.zshrc