Zshは醸造式を完成させます

Zshは醸造式を完成させます

OS XではZshを取得する方法がありますか(私はああ、)タブ全体の数式?

例えば

$ brew install em<TAB>

次に拡張可能:

$ brew install emacs

答え1

式をインストールしてみてくださいzsh-completions

$ brew info zsh-completions
zsh-completions: stable 0.10.0, HEAD
https://github.com/zsh-users/zsh-completions
Not installed
From: https://github.com/Homebrew/homebrew/commits/master/Library/Formula/zsh-completions.rb
==> Caveats
To activate these completions, add the following to your .zshrc:

  fpath=(/usr/local/share/zsh-completions $fpath)

You may also need to force rebuild `zcompdump`:

  rm -f ~/.zcompdump; compinit

Additionally, if you receive "zsh compinit: insecure directories" warnings when attempting
to load these completions, you may need to run this:

  chmod go-w /usr/local/share

zshがbashの完成とある程度互換性があるようです。。数式を使って試すことができますbash-completions

答え2

Homebrewは独自の完成機能を提供します。ファイルのどこかにファイルを$(brew --prefix)/Library/Contributions/brew_zsh_completion.zshリンクするだけです。 (最初のコメントを参照してください。_brew$fpathhttps://github.com/Homebrew/homebrew/blob/master/Library/Contributions/brew_zsh_completion.zsh)

zsh-completions_brewこのファイルのために最近、対応する補完が削除されました。参考https://github.com/zsh-users/zsh-completions/issues/305


2016-04-19アップデート:ある時点で(1) Homebrewはzsh完了処理をもう一度更新しました。今インストールすると扱いにくいHomebrewを介して「ただ働く」必要があります。このファイルはにインストールされます/usr/local/share/zsh/site-functions/_brew

関連情報