commit: bfde5e4653b1a4e53935326741d6bd162186659d
Author: Tim Harder <radhermit <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 29 02:34:23 2014 +0000
Commit: Tim Harder <radhermit <AT> gentoo <DOT> org>
CommitDate: Sat Mar 29 02:34:23 2014 +0000
URL:
http://git.overlays.gentoo.org/gitweb/?p=proj/zsh-completion.git;a=commit;h=bfde5e46
_portage_utils: fix arch list to skip comments
---
_portage_utils | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/_portage_utils b/_portage_utils
index a68be34..dc0d918 100644
--- a/_portage_utils
+++ b/_portage_utils
@@ -27,15 +27,17 @@ case $service in
{'(--compare)-c','(-c)--compare'}'[Compare two atoms]'
;;
qcache)
- local arches allarches arch
+ local arch
+ local -a arches allarches
+
show_archs(){
arches=(${(f)"$(<$PORTDIR/profiles/arch.list)"})
- allarches=($archs)
for arch in $arches; do
- allarches=($allarches $arch)
+ [[ $arch =~ '^[^#]' ]] && allarches+=( $arch )
done
_describe -t available-arches "arch" allarches
}
+
_arguments -s $common_args \
{'(--matchpkg)-p','(-p)--matchpkg'}'[match
pkgname]:package name:_gentoo_packages available_pkgnames_only' \
{'(--matchcat)-c','(-c)--matchcat'}'[match
catname]:category:_gentoo_packages category' \