aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/_gentoo_arches11
-rw-r--r--src/_portage_utils13
2 files changed, 12 insertions, 12 deletions
diff --git a/src/_gentoo_arches b/src/_gentoo_arches
new file mode 100644
index 0000000..7206ea3
--- /dev/null
+++ b/src/_gentoo_arches
@@ -0,0 +1,11 @@
+#autoload
+
+local arches arch allarches
+
+arches=(${(f)"$(<$(_gentoo_repos -m)/profiles/arch.list)"})
+for arch in $arches; do
+ [[ $arch =~ '^[^#]' ]] && allarches+=( $arch )
+done
+_describe -t available-arches "arch" allarches
+
+# vim: ft=zsh sw=2 ts=2 et
diff --git a/src/_portage_utils b/src/_portage_utils
index cab73f9..3e483a6 100644
--- a/src/_portage_utils
+++ b/src/_portage_utils
@@ -19,17 +19,6 @@ case $service in
{'(--compare)-c','(-c)--compare'}'[Compare two atoms]'
;;
qcache)
- local arch
- local -a arches allarches
-
- show_archs(){
- arches=(${(f)"$(<$(_gentoo_repos -m)/profiles/arch.list)"})
- for arch in $arches; do
- [[ $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' \
@@ -39,7 +28,7 @@ case $service in
{'(--stats)-s','(-s)--stats'}'[display statistics about the portage tree]' \
{'(--all)-a','(-a)--all'}'[list packages that have at least one version keyworded for on a given arch]' \
{'(--not)-n','(-n)--not'}"[list packages that aren't keyworded on a given arch]" \
- '*:arch:show_archs'
+ '*:arch:_gentoo_arches'
;;
qcheck)
_arguments -s $common_args \