zsh自动填充插件zsh-autosuggestionszsh

brew安装

brew install zsh-autosuggestions

Logs:

Last login: Wed Mar  6 10:07:19 on ttys000
➜  ~ brew install zsh-autosuggestions
==> Downloading https://formulae.brew.sh/api/formula.jws.json
##O=-#     #
==> Downloading https://formulae.brew.sh/api/cask.jws.json
##O=-#     #
==> Downloading https://ghcr.io/v2/homebrew/core/zsh-autosuggestions/manifests/0.7.0-1
############################################################################################################################################################################## 100.0%
==> Fetching zsh-autosuggestions
==> Downloading https://ghcr.io/v2/homebrew/core/zsh-autosuggestions/blobs/sha256:4537653cbf3540a0785481966b36291255839f1be4012a22409ef97c46a1860b
############################################################################################################################################################################## 100.0%
==> Pouring zsh-autosuggestions--0.7.0.all.bottle.1.tar.gz
==> Caveats
To activate the autosuggestions, add the following at the end of your .zshrc:

  source /opt/homebrew/share/zsh-autosuggestions/zsh-autosuggestions.zsh

You will also need to restart your terminal for this change to take effect.
==> Summary
🍺  /opt/homebrew/Cellar/zsh-autosuggestions/0.7.0: 6 files, 44.8KB
==> Running `brew cleanup zsh-autosuggestions`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).

根据上述提示,编辑~/.zshrc:在末尾追加

source /opt/homebrew/share/zsh-autosuggestions/zsh-autosuggestions.zsh

最后,使之生效

source ~/.zshrc

效果:

发表回复