If PORTDIR is not set in make.conf, then zsh-completion does not complete the package names. I have been able to trace the issue back to the absence of the PORTDIR variable from /usr/share/portage/config/make.globals, which zsh-completion uses. A simple patch which uses portageq as a final option is attached. Reproducible: Always Steps to Reproduce: 1. emerge zsh-completion && exec zsh 2. emerge <tab> Actual Results: Only packages from local overlays are completed. Expected Results: All package names should be completed. Attached patch fixes the bug by using portageq envvar PORTDIR
Created attachment 355654 [details, diff] Patch to always obtain PORTDIR
Just an update - using portageq slows down the completion but it will probably never fail. If you want faster completion, then just define PORTDIR in /etc/portage/make.conf.
see https://git.overlays.gentoo.org/gitweb/?p=proj/gentoo-bashcomp.git;a=commit;h=bf91db09a102544196b21cd792ac423262656a9a for the fix used in gentoo-bashcomp.
fixed yesterday in zsh-completions repo on g.o.g.o. Although, gitweb is unavailable there, and it is not synced with GH mirror...
Should be fixed in the most recent release of the renamed gentoo-zsh-completions now.