Skip to content

Instantly share code, notes, and snippets.

@juno
Last active December 30, 2019 09:04
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save juno/5546198 to your computer and use it in GitHub Desktop.
Homebrewでzsh-completionsを利用する手順。

Homebrewでzsh-completionsを利用する手順

Homebrewでzsh-completionsによる補完を使うには、zsh-completionsパッケージをインストールします。

$ brew install zsh-completions

.zshrcに、インストール時に表示された以下のような記述を追加する。既に記述済みの設定がある場合は適宜調整する。

fpath=(/path/to/homebrew/share/zsh-completions $fpath)

autoload -U compinit
compinit -u

zcompdumpをリビルドする。

$ rm -f ~/.zcompdump; compinit

シェルを再起動すると、ackherokuコマンドなどで補完が有効になる。どのようなコマンドの補完が用意されているかは https://github.com/zsh-users/zsh-completions/tree/master/src を参照。

@batako
Copy link

batako commented Dec 30, 2019

typo
- $ brew instsall zsh-completions
+ $ brew install zsh-completions

@juno
Copy link
Author

juno commented Dec 30, 2019

@batako
Thanks!
I just updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment