Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

share|improve this question

1 Answer 1

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 http://bazaar.launchpad.net/~benji/+junk/zsh-juju-completion/view/head:/_juju 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 http://bazaar.launchpad.net/~benji/+junk/zsh-juju-completion/_juju > ~/.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: github.com/robbyrussell/oh-my-zsh/pull/3166 –  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.