sudo apt install zsh安装oh my zsh
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"安装 Powerlevel10k主题
git clone https://github.com/romkatv/powerlevel10k.git $ZSH_CUSTOM/themes/powerlevel10k
注意要下载字体,不然会乱码
可以从https://www.nerdfonts.com/font-downloads下载,我下载的是Jetbrain的
下载完把ttf文件安在/usr/share/fonts中
然后在终端的preference里面选择字体。
然后p10k configure
zsh配置插件
zsh-autosuggestions
git clone git://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions编辑
~/.zshrc,设置plugins
plugins=(zsh-autosuggestions git)
source ~/.zshrczsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $ZSH_CUSTOM/plugins/zsh-syntax-highlighting
echo "source $ZSH_CUSTOM/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ${ZDOTDIR:-$HOME}/.zshrc使插件生效
source ~/.zshrc参考来源
作者:kk3909 链接:https://juejin.cn/post/6985123210782212132 来源:稀土掘金
没有评论:
发表评论