CentOS安裝oh-my-zsh並配置語法高亮和命令自動補全


安裝zsh 和 oh-my-zsh

  1. 安裝zsh
    yum install zsh

  2. 安裝git
    yum install git

  3. 切換默認shell
    chsh -s /bin/zsh

  4. clone from GitHub
    git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh

  5. 復制默認.zshrc
    cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc

安裝插件

語法高亮插件

  1. 安裝
    git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting

  2. 配置
    在~/.zshrc的plugins中加入zsh-syntax-highlighting

自動補全插件

  1. 安裝
    git clone git://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions

  2. 配置
    在~/.zshrc的plugins中加入zsh-autosuggestions


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM