Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I use zsh as my shell and tab completion doesn't work, how can I enable it?

share|improve this question
up vote 5 down vote accepted

If you don't already have custom completion scripts, make a directory (e.g., ~/.zsh/completion) and add a line like fpath=(~/.zsh/completion $fpath) to the top of your .zshrc.

You can then visit and click "Download File" and save it as _juju in the directory you made.

Alternatively, if you have bzr installed, you can fetch the file like so:

bzr cat > ~/.zsh/completion/_juju

The completion file is generated by the script located at

I'd like to add completion of service, unit, and charm names eventually. Patches welcome!

share|improve this answer
I've submitted a pull request to oh-my-zsh to have the code from benji as a plugin: – ayr-ton Sep 22 '14 at 18:22

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.