Useful or not, from you.
for-win compinit:501: no such file or directory: /usr/share/zsh/vendor-completions/_docker

<!-- Please, check https://docs.docker.com/docker-for-windows/troubleshoot/. Issues without logs and details cannot be debugged, and will be closed.

Issues unrelated to Docker Desktop will be closed. In particular, see

  • https://github.com/moby/moby/issues for Docker daemon, e.g. running on Windows Server with Docker EE
  • https://github.com/docker/compose/issues for docker-compose
  • https://github.com/docker/machine/issues for docker-machine
  • https://github.com/docker/docker.github.io/issues for the documentation -->

<!-- Click these checkboxes after submitting. --> <!-- Download Docker Desktop 'Edge' (latest build) here: https://hub.docker.com/editions/community/docker-ce-desktop-windows -->

  • [x] I have tried with the latest version of my channel (Stable or Edge)
  • [ ] I have uploaded Diagnostics
  • Diagnostics ID:

Expected behavior

No issues with zsh completions and compinit when starting a new shell

Actual behavior

I installed Docker for Windows 2.3.0.4 on Windows 10 Version 2004 (build 19041.450) and enabled WSL integration. Then I turned off Docker for Windows because of resource consumptions. Now I get this error every time I start my zsh shell:

compinit:501: no such file or directory: /usr/share/zsh/vendor-completions/_docker

I noticed that the file /usr/share/zsh/vendor-completions/_docker is a link to a wsl mount:

$ ls -l /usr/share/zsh/vendor-completions/_docker
lrwxrwxrwx 1 root root 74 Sep  3 11:17 /usr/share/zsh/vendor-completions/_docker -> /mnt/wsl/docker-desktop/cli-tools/usr/share/zsh/vendor-completions/_docker

so I assume this file is present only when Docker for Windows is running, but I need to turn it off or my machine won't make it.

my ~/.zshrc file is:

plugins=(git docker zsh-completions)

source $ZSH/oh-my-zsh.sh

# zsh-completions
autoload -U compinit && compinit

Information

<!-- Please, help us understand the problem. For instance:

  • Is it reproducible?
  • Is the problem new?
  • Did the problem appear with an update?
  • A reproducible case if this is a bug, Dockerfiles with reproduction inside is best. -->
  • Windows Version:
  • Docker Desktop Version:
  • Are you running inside a virtualized Windows e.g. on a cloud server or on a mac VM:

Steps to reproduce the behavior

<!-- A reproducible case, Dockerfiles with reproduction inside is best. -->

  1. Configure oh-my-zsh plugins, add docker
  2. Install Docker For Windows
  3. Turn off Docker for Windows
  4. Open a shell
That's a useful answer
Without any help

@simonferquel Have you seen this before?