Gentoo Archives: gentoo-commits

From: Tim Harder <radhermit@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/zsh-completion:master commit in: /
Date: Sat, 29 Mar 2014 02:35:49
Message-Id: 1396060463.bfde5e4653b1a4e53935326741d6bd162186659d.radhermit@gentoo
1 commit: bfde5e4653b1a4e53935326741d6bd162186659d
2 Author: Tim Harder <radhermit <AT> gentoo <DOT> org>
3 AuthorDate: Sat Mar 29 02:34:23 2014 +0000
4 Commit: Tim Harder <radhermit <AT> gentoo <DOT> org>
5 CommitDate: Sat Mar 29 02:34:23 2014 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/zsh-completion.git;a=commit;h=bfde5e46
7
8 _portage_utils: fix arch list to skip comments
9
10 ---
11 _portage_utils | 8 +++++---
12 1 file changed, 5 insertions(+), 3 deletions(-)
13
14 diff --git a/_portage_utils b/_portage_utils
15 index a68be34..dc0d918 100644
16 --- a/_portage_utils
17 +++ b/_portage_utils
18 @@ -27,15 +27,17 @@ case $service in
19 {'(--compare)-c','(-c)--compare'}'[Compare two atoms]'
20 ;;
21 qcache)
22 - local arches allarches arch
23 + local arch
24 + local -a arches allarches
25 +
26 show_archs(){
27 arches=(${(f)"$(<$PORTDIR/profiles/arch.list)"})
28 - allarches=($archs)
29 for arch in $arches; do
30 - allarches=($allarches $arch)
31 + [[ $arch =~ '^[^#]' ]] && allarches+=( $arch )
32 done
33 _describe -t available-arches "arch" allarches
34 }
35 +
36 _arguments -s $common_args \
37 {'(--matchpkg)-p','(-p)--matchpkg'}'[match pkgname]:package name:_gentoo_packages available_pkgnames_only' \
38 {'(--matchcat)-c','(-c)--matchcat'}'[match catname]:category:_gentoo_packages category' \