zsh 终端 自动建议

作者: Ju4t

安装

克隆 安装

  • 将此存储库克隆到您机器上的某个位置。 本指南将假定 ~/.zsh/zsh-autosuggestions。
git clone https://github.com/zsh-users/zsh-autosuggestions ~/.zsh/zsh-autosuggestions
  • 将以下内容添加到您的 .zshrc:
source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh
  • 开始一个新的终端会话。

Homebrew 安装

通过 Homebrew 搜索 zsh,即会发现有 zsh-autosuggestions

# 安装
brew install zsh-autosuggestions

# 写入.zshrc
echo "source /opt/homebrew/share/zsh-autosuggestions/zsh-autosuggestions.zsh" >> ~/.zshrc

官网 https://github.com/zsh-users/zsh-autosuggestions