Ubuntu 終端配置


  • 安裝zsh apt install zsh

  • 設置zsh為默認shell chsh -s /bin/zsh

    • 恢復 bash 使用 chsh -s /bin/bash
  • 安裝 Oh My Zsh

    • sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
  • 配置語法高亮

  • 配置自動補全

➜  ~ cd ~/.oh-my-zsh/lib

➜  lib git:(master) git clone https://github.com/zsh-users/zsh-syntax-highlighting.git
正克隆到 'zsh-syntax-highlighting'...
remote: Enumerating objects: 61, done.
remote: Counting objects: 100% (61/61), done.
remote: Compressing objects: 100% (40/40), done.
remote: Total 5341 (delta 28), reused 43 (delta 21), pack-reused 5280
接收對象中: 100% (5341/5341), 1.10 MiB | 151.00 KiB/s, 完成.
處理 delta 中: 100% (3526/3526), 完成.
➜  lib git:(master) ✗ git clone https://github.com/zsh-users/zsh-autosuggestions.git    
正克隆到 'zsh-autosuggestions'...
remote: Enumerating objects: 65, done.
remote: Counting objects: 100% (65/65), done.
remote: Compressing objects: 100% (28/28), done.
remote: Total 1943 (delta 37), reused 65 (delta 37), pack-reused 1878
接收對象中: 100% (1943/1943), 450.20 KiB | 168.00 KiB/s, 完成.
處理 delta 中: 100% (1221/1221), 完成.

➜  lib git:(master) ✗ echo 'source ~/.oh-my-zsh/lib/zsh-autosuggestions/zsh-autosuggestions.zsh   \n                                        
source ~/.oh-my-zsh/lib/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh'>> ~/.zshrc 


免責聲明!

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



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