commit:     646f3428adf6fe90b35ddf69ae036326a9093ea3
Author:     Joey Pabalinas <joeypabalinas <AT> gmail <DOT> com>
AuthorDate: Fri Sep  5 19:56:02 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Feb 27 23:10:15 2026 +0000
URL:        
https://gitweb.gentoo.org/proj/zsh-completion.git/commit/?id=646f3428

_gentoo_packages: remove metadata.xml from completion

Currently, when you try to complete cat/pkg, metadata.xml will be
shown as one of the completions.

To reproduce: `emerge x11-terms/<TAB>` and you will see metadata.xml
in the list.

Remove metadata.xml from the $pkg array after populating it.

Signed-off-by: Joey Pabalinas <joeypabalinas <AT> gmail.com>
Part-of: https://github.com/gentoo/zsh-completion/pull/35
Closes: https://github.com/gentoo/zsh-completion/pull/35
Signed-off-by: Sam James <sam <AT> gentoo.org>

 src/_gentoo_packages | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/_gentoo_packages b/src/_gentoo_packages
index c2d9d36..ccc269d 100644
--- a/src/_gentoo_packages
+++ b/src/_gentoo_packages
@@ -169,6 +169,7 @@ _gentoo_packages_update_available(){
   else
     compset -P '*/'
     pkg=($repos/$IPREFIX/*(:t))
+    pkg=(${pkg:#metadata.xml})
     _wanted cat_packages expl 'category/package' compadd $pkg
   fi
 }

Reply via email to