zsh的基本配置

1. 按照Oh my zsh $ sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" 2. 配置Oh my zsh 将zsh设置为默认Shell (脚本的最后一般会问你是否切换) chsh -s /bin/zsh # 不需要使用root权限 更换主题 vim ~/.zshrc 找到ZSH_THEME='robbyrussell', 更换为你想要使用的主题,可以在这里找到你想要的主题 安装插件 vim ~/.zshrc 找到plugins=(), 添加插件名称,我这里添加的插件有: plugins=(git zsh-autosuggestions zsh-syntax-highlighting) git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions 完成 source ~/.zshrc # 启动zsh 3. 使用主题powerlevel10k 下载主题 git clone --depth=1 https://gitee.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k 打开你的~/.zshrc,将主题换为:powerlevel10k/powerlevel10k 更改保存并使用主题 source ~/.zshrc 这时powerlevel10k会自动启动,询问你想要的配置 按照提示配置你想要的风格即可

May 20, 2021 · 1 min · 李昌