下载zsh 和 oh-my-zsh
sudo apt install zsh #下载zsh
sh -c "$(wget -O- https://gitee.com/mirrors/oh-my-zsh/raw/master/tools/install.sh)" #下载oh-my-zsh(镜像地址,原网址可能被墙),安装完后会提示是否将默认shell指定为zsh
设置颜色主题
cd ~/.oh-my-zsh/thems #进入主题目录,可查看已有主题(具体主题可在GitHub上查看)
vi ~/.zshrc #修改主题名称(ZSH_THEME=)
安装插件
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $ZSH_CUSTOM/plugins/zsh-syntax-highlighting #语法高亮插件
git clone https://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions #历史提示插件(ctrl + f采纳)
#自动跳转插件安装(猜测你可能要使用的目录等)
git clone git://github.com/joelthelion/autojump.git
# 进入clone目录,接着执行安装文件
cd autojump
./install.py
# 接着根据安装完成后的提示,在~/.bashrc最后添加下面语句:
vim ~/.bashrc
[[ -s /home/misfit/.autojump/etc/profile.d/autojump.sh ]] && source /home/misfit/.autojump/etc/profile.d/autojump.sh
#安装后,修改~/.zshrc启用插件
vi ~/.zshrc #编辑
#在plugins后括号添加安装的插件名(原:plugins=(git))
plugins=(git
autojump
zsh-autosuggestions
zhs-syntax-highlighting
)
source ~/.zshrc #即刻刷新