本文最后更新于 291 天前,如过您尝试失败,不出意外应该是出意外了。
前置步骤
sudo apt-get install git -y
为服务器安装ZSH
sudo apt-get install zsh -y
➜ ~ zsh --version
zsh 5.8 (x86_64-debian-linux-gnu)
安装oh-my-zsh
因为云服务器在国内所以连接外网的效果不是很好,所以我把zsh官方的install脚本套了个proxy,希望各位喜欢
sh -c "$(wget -qO- https://ghproxy.com/https://raw.githubusercontent.com/Erica-Iris/Blog_/master/omz/install.sh)"
omz是一个非常好的zsh管理框架,能管理plugin
建议安装的plugin
/
zsh-syntax-highlighting
语法高亮插件
git clone --depth=1 https://ghproxy.com/https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-${ZSH:-~/.oh-my-zsh}/custom}/plugins/zsh-syntax-highlighting
zsh-autosuggestions
自动补全
git clone https://ghproxy.com/https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
安装主题
git clone --depth=1 https://ghproxy.com/https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
Set ZSH_THEME="powerlevel10k/powerlevel10k" in ~/.zshrc.
把ZSH_THEME=”powerlevel10k/powerlevel10k”写入到.zshrc.