#10412·ohmyzsh

Plugin subdirectories that contain completion files are not loaded

Author: felipecrsCreated Nov 12, 2021Updated Sep 7, 2026
LabelsFeatureArea: initTopic: completion

Describe the bug

I have my own completions set at $ZSH_CUSTOM/plugins/my-completions/src and a my-completions.plugin.zsh to add src to fpath.

However, while the completions for the built-in plugins of OMZ seems to be working fine, my completions at my custom simply do not get loaded.

I have to manually run compinit (or add it after the source .oh-my-zsh.zsh, but it brings some consequences like not leveraging cache).

Steps to reproduce

Here is my .zshrc:

https://github.com/felipecrs/dotfiles/blob/master/home/dot_zshrc

and here is my-completions:

https://github.com/felipecrs/dotfiles/tree/master/home/dot_oh-my-zsh/custom/plugins/exact_my-completions

both deno and volta does not work.

Expected behavior

It's expected to simply work, without me having to re-run compinit.

Screenshots and recordings

https://user-images.githubusercontent.com/29582865/141393793-2082836e-8777-44fc-a0ca-34aecb23ab58.mp4

OS / Distro

Ubuntu 20.04

Zsh version

5.8

Terminal emulator

Windows Terminal

If using WSL on Windows, which version of WSL

WSL2

Additional context

In the zsh-completions install guide for OMZ, they suggest adding autoload -U compinit && compinit but I guess that was not supposed to be needed.

And yes, I already tried to disable everything in my zshrc to isolate the issue, and it does not work.