安装zsh和其相应组件
转载:https://www.cnblogs.com/EasonJim/p/7863099.html
1、安装zsh
安装运行:
sudo apt-get install zsh
修改默认shell:
chsh -s /bin/zsh
安装完成,重启!(我没遇到任何问题)
2、安装oh-my-zsh
第一次使用zsh会出现一个提示:
这个可以不用管,按q键退出。因为我们后面用oh-my-zsh来配置.zshrc文件
新系统先安装git:
sudo apt-get install git
安装oh-my-zsh:
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
OK!
3、安装相应插件
自动跳转插件:
sudo apt-get install autojump
修改配置文件:
gedit ~/.zshrc
最后一行添加:
. /usr/share/autojump/autojump.sh
source ~/.zshrc
高亮插件:
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git
echo "source ${(q-)PWD}/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ${ZDOTDIR:-$HOME}/.zshrc
source ~/.zshrc
语法记录插件:
git clone git://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions
修改配置文件:在plugins里面添加zsh-autosuggestions
在souce 一下配置文件
修改主题:在ZSH-THEME里面配置。