How to fix oh-my-zsh plugin autocomplete feature

Posted by in ZSH, last updated on 25 April, 2020

The issue

I recently ran into an issue after installing docker and adding it to the plugins section in my .zshrc file, autocomplete just wouldn’t work (even though oh-my-zsh plugin installation is so straightforward).

First make sure your syntax is OK, plugins should be separated by a space only and no commas:

plugins=(git docker docker-compose)

After reloading my zshrc file with source ~/.zshrc it still didn’t work. I had to delete ZSH’s .zcompdump file:

rm ~/.zcompdump*

After that it started working!

.zcompdump is a cached file speeds up auto-completion, but in my case wasn’t being regenerated after adding new plugins. Delete this file and ZSH will regenerate it for you.

Other things you can try

If that still doesn’t work for then try the following:

  1. Move the export ZSH=$HOME/.oh-my-zsh line after the plugins=(...) line.
  2. Move source $ZSH/oh-my-zsh.sh to the end of the file.

Don’t forget to run source ~/.zshrc after making changes to the file.


Daniel Wachtel

Written by Daniel Wachtel

Daniel is a Full Stack Engineer who outside work hours is usually found working on side projects or blogging about the Software Engineering world.