一些常用的zsh插件

安装zsh

brew install zsh

安装oh-my-zsh

https://github.com/robbyrussell/oh-my-zsh

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

zsh插件

auto-suggestions

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

  1. Clone this repository into $ZSH_CUSTOM/plugins (by default ~/.oh-my-zsh/custom/plugins)
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
  1. Add the plugin to the list of plugins for Oh My Zsh to load (inside ~/.zshrc):
plugins=(zsh-autosuggestions)
  1. Start a new terminal session.

zsh-syntax-highlighting

https://github.com/zsh-users/zsh-syntax-highlighting

  1. Clone this repository in oh-my-zsh's plugins directory:
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
  1. Activate the plugin in ~/.zshrc:
plugins=( [plugins...] zsh-syntax-highlighting)
  1. Restart zsh (such as by opening a new instance of your terminal emulator).

zsh-history-substring-search

https://github.com/zsh-users/zsh-history-substring-search

  1. Clone this repository in oh-my-zsh's plugins directory:
git clone https://github.com/zsh-users/zsh-history-substring-search ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-history-substring-search
  1. Activate the plugin in ~/.zshrc:
plugins=( [plugins...] history-substring-search)
  1. Source ~/.zshrc to take changes into account:
source ~/.zshrc
  1. Bind keyboard shortcuts to this script's functions.
bindkey '^[[A' history-substring-search-up
bindkey '^[[B' history-substring-search-down

z

just add z to the plugins array in .zshrc

plugins=( [plugins...] z )
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容