推荐几个好用的 zsh 插件,安装以 Oh My Zsh 为例。
zsh-autosuggestions
自动补全插件,必备单品。

输入部分命令,按方向键右➡️。
安装
1 |
|
zsh-syntax-highlighting
高亮插件,必备单品。
安装
1 |
|
gitignore
一行命令自动下载 gitignore 模板,简化了新建项目时配置 gitignore 的麻烦。
使用
1 |
|
插件会自动下载对应的模板文件到指定文件。
安装
1 |
|
git-open
通过命令打开 git repository 的 web 页面,目前支持以下 hosts。
- github.com
- gist.github.com
- gitlab.com
- GitLab custom hosted (see below)
- bitbucket.org
- Atlassian Bitbucket Server (formerly Atlassian Stash)
- Visual Studio Team Services
- Team Foundation Server (on-premises)
- AWS Code Commit
使用
1 |
|
安装
1 |
|
hitokoto/rand-quote
从 hitokoto.cn 或 Random Quotes 随机获取一句话,配合 cowsay 使用,可在每次启动 zsh 时让小牛对你打招呼~~

安装及配置
安装 hitokoto 或 rand-quote
1
2
3omz plugin enable hitokoto
# or
omz plugin enable rand-quote
注意:这两个插件装一个即可。hitokoto 提供的是中文社区的句子,rand-quote 提供的是英文社区的句子。
安装 cowsay
1
2
3brew install cowsay
# or
npm install -g cowsay在 .zshrc 最后一行添加
1
2
3quote | cowsay
# or
hitokoto | cowsay
web-search
使用命令直接搜索 google/baidu/github 等网站。
使用
1 |
|
具体支持的网站可使用 omz plugin info web-search
查询。
安装
1 |
|
z
快速跳转到常用的目录。

安装
1 |
|