Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Zsh Docker Plugin not Working

I have been using oh-my-zsh for a while now and the docker plugin as recently stopped working for me for some reason.

I checked my ~/.zshrc file and the plugin is included

plugins=(git colored-man colorize github jira vagrant virtualenv pip python brew osx zsh-syntax-highlighting docker)

I checked the ~/.oh-my-zsh/plugins/docker directory and there is a _docker file in there. Yet when I type docker and press Tab, I get none of the autocomplete shortcuts that I used to get.

I can confirm that my git plugin works just fine but not the docker plugin. Tried doing exec zsh and source ~/.zshrc and restarted my terminal but no luck.

Am I missing something?

like image 546
Mikhail D'Souza Avatar asked May 25 '16 04:05

Mikhail D'Souza


2 Answers

You might want to try and remove any .zcompdump-(...) files you may have on your user's home directory - using something like rm ~/.zcompdump* on a terminal, or some file browser - and then reload the .zschrc file with the command source ~/.zshrc or restart the terminal - whichever works best for you. See this

Then see if it works.

like image 99
Rui Carvalho Avatar answered Oct 21 '22 13:10

Rui Carvalho


It seems oh-my-zsh is not loading plugins/docker/_docker file. You must add it to ~/.zshrc in an another way. Add these lines to your ~/.zshrc file:

fpath+=($ZSH/plugins/docker) autoload -U compinit && compinit 
like image 23
youhans Avatar answered Oct 21 '22 11:10

youhans