I noticed packages in layman overlays are not shown for completion, neither are sets as introduced in portage 2.2. I fixed both as described below. I tweaked _gentoo_packages (usually found in /usr/share/zsh/site-functions) to include layman's make.conf for overlays which fixed the first issue. Second I added all sets defined in /etc/portage/sets or any overlay containing as 'sets' subdirectory. So far it seems to work flawlessly, though I'm not quite sure I've chosen the best approach. As attachements there's the new _gentoo_packages file as well as a diff to the old version. Reproducible: Always
Created attachment 258960 [details] enhanced _gentoo_packages
Created attachment 258961 [details, diff] diff to the old file
Created attachment 259645 [details] modified _portage file As I noticed --depclean does not include packages for completion. At least in portage 2.2 (don't know about earlier versions) it can and should be used to uninstall specific packages. In difference to -C it checks if a package depends on the selected package, delivering a safer method to unmerge without accidently breaking something else. The attached _portage file adds installed packages as completions for --depclean (and contains a modified description, of course)
Created attachment 259647 [details, diff] diff to the old _portage file
Created attachment 259736 [details] updated _portage skript included option "--keep-going"
Created attachment 259739 [details, diff] diff to _portage file from zsh-completion-20091203-r1
Created attachment 259882 [details] zsh-completion ebuild to enable portage 2.2 specific stuff I modified the existing ebuild to incorporate my modifications. Since most (if not all) features I included are part only included in portage 2.2, they are not included by default. Right now I check if portage 2.2 is installed, if so I apply the two respective patches. As a consequence I replaced the regular diff files with actual patches, as usual these go into the ./files directory.
Created attachment 259884 [details, diff] patch to current _gentoo_packages
Created attachment 259886 [details] patch to current _portage file
It's a strange thing nobody has ever responded here.
(In reply to comment #10) > It's a strange thing nobody has ever responded here. Not really. The package is not maintained well in Gentoo, seems that no one cares about it since 2009 (the last version). Luckily, there is user interest such as Johannes to provide patches on bugzilla.
This was just a small improvement, there are still things not working as intended (not just concerning portage). I switched to paludis a while back and thus haven’t worked on this any further. I am on the verge to switch back to portage. Chances are good I’ll take up the work on zsh-completion again, provided I have enough time on my hands. Should I continue to work on the completion scripts, I may as well just maintain them.
I'm trying to reinvigorate gentoo zsh completion development, the new canonical repo is currently at https://github.com/radhermit/gentoo-zsh-completions. I incorporated a few of these changes but some were a bit old compared to the current sources. Going forward, please either open issues or submit pull requests against the upstream github repo instead of opening bugs here. Non-dev contributors who prove they're able and willing to aid development can be given push access to the github repo.