Ubuntu 安装oh-my-zsh配置

  1. 安装zsh

sudo apt install zsh -y

  1. 安装oh-my-zsh

wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | sh 或者 sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

  1. 切换为zsh,并重启

chsh -s /usr/bin/zsh reboot

  1. 切换主题

vim .zshrc 将ZSH_THEME后面的字段改为agnoster保存 保存执行source .zshrc

  1. 安装插件

高亮插件zsh-syntax-highlighting

cd ~/.oh-my-zsh/plugins/

git clone https://github.com/zsh-users/zsh-syntax-highlighting.git

vim ~/.zshrc

plugins中添加zsh-syntax-highlighting且必须放在最后 并在文件的最后添加
source ~/.oh-my-zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh

保存执行source .zshrc

命令补全zsh-autosuggestions

git clone https://github.com/zsh-users/zsh-autosuggestions

在plugins中添加zsh-autosuggestions 保存执行source .zshrc

# oh-my-zsh 

评论

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×