Oh my zsh

安装

# 安装
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

#手动安装
git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc

#将zsh设置为默认shell
cat /etc/shells 
chsh -s /bin/zsh
echo $SHELL

#主题配置,编辑 ~/.zshrc 文件
ZSH_THEME="robbyrussell" 
#robbyrussell替换为想要的主题,官方主题列表https://github.com/ohmyzsh/ohmyzsh/wiki/Themes

#配置生效
source ~/.zshrc

主题

https://github.com/ohmyzsh/ohmyzsh/wiki/External-themes

插件

#zsh-you-should-use: 当你尝试使用某个命令时,提醒你是否有更好的替代方案。
git clone https://github.com/MichaelAquilina/zsh-you-should-use ~/.oh-my-zsh/custom/plugins/zsh-you-should-use
plugins=(git zsh-you-should-use)
source ~/.zshrc

#zsh-navigation-tools: 提供增强的目录导航功能,使得在终端中浏览文件系统更加方便。
git clone https://github.com/psprint/zsh-navigation-tools ~/.oh-my-zsh/custom/plugins/zsh-navigation-tools
plugins=(git zsh-navigation-tools)
source ~/.zshrc

#zsh-autosuggestions: 在输入时根据历史命令和当前输入提供自动补全建议。
git clone https://github.com/zsh-users/zsh-autosuggestions ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions
source ~/.zshrc

#zsh-syntax-highlighting: 根据命令的语法和正确性对输入的命令进行高亮显示。
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting
plugins=(git zsh-syntax-highlighting)
source ~/.zshrc