Sign up ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

In OS X, is there any way to have Zsh (I'm using Oh-my-zsh) tab-complete formulas?


$ brew install em<TAB>

could expand to:

$ brew install emacs
share|improve this question

1 Answer 1

up vote 9 down vote accepted

Try installing the zsh-completions formula.

$ brew info zsh-completions
zsh-completions: stable 0.10.0, HEAD
Not installed
==> 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

It also looks like zsh may have some compatibility with bash completions. You could try that in conjunction with the bash-completions formula.

share|improve this answer
compinit -i should solve the the "insecure directories" warnings rather than chmod. – Guy Hughes May 16 at 2:23

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.