个人使用的oh-my-zsh配置

LHabc 发布于 2024-09-13


记录一下服务器上oh-my-zsh及其主题与插件的安装命令

主题:

  • powerlevel10k

插件:

  • git
  • zsh-autosuggestions
  • zsh-syntax-highlighting
  • sudo
sudo apt update && sudo apt upgrade -y && \
sudo apt install zsh git curl -y
sh -c "$(curl -fsSL https://install.ohmyz.sh)"
git clone https://github.com/zsh-users/zsh-autosuggestions "${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/zsh-autosuggestions" && \
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git "${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting" && \
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
sed -i 's/^plugins=(git)$/plugins=(git zsh-autosuggestions zsh-syntax-highlighting sudo)/' ~/.zshrc && \
sed -i 's/^ZSH_THEME="robbyrussell"/ZSH_THEME="powerlevel10k\/powerlevel10k"/' ~/.zshrc
source ~/.zshrc