記錄一下 zsh 的下載與配置,省得每次重裝系統都要上網到處查。
- 安裝 zsh shell
sudo apt install zsh
- 切換 shell
chsh -s /bin/zsh
- 安裝 oh-my-zsh
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
或者
sh -c "$(wget https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
- 下載 zsh-syntax-highlighting 語法高亮插件
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh}/plugins/zsh-syntax-highlighting
- 下載 zsh-autosuggestions 自動提示插件
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh}/plugins/zsh-autosuggestions
- 配置 .zshrc 文件
vim ~/.zshrc
plugins=(git zsh-syntax-highlighting zsh-autosuggestions)