aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Harder <radhermit@gentoo.org>2014-12-21 01:33:06 -0800
committerTim Harder <radhermit@gentoo.org>2014-12-21 01:33:06 -0800
commit14ad3adb3606e7d7f7d538ae8f7cda2f8b11d93c (patch)
treec584c938622968ac5536cfc41bf8d7f2a0baf2fd /src/_gentoo_arches
parentuse reStructuredText for the readme (diff)
downloadzsh-completion-14ad3adb3606e7d7f7d538ae8f7cda2f8b11d93c.tar.gz
zsh-completion-14ad3adb3606e7d7f7d538ae8f7cda2f8b11d93c.tar.bz2
zsh-completion-14ad3adb3606e7d7f7d538ae8f7cda2f8b11d93c.zip
split out arches list into it's own completion file
This might be combined later on with _gentoo_repos to form a _gentoo file that accepts command args related to the completion function requested.
Diffstat (limited to 'src/_gentoo_arches')
-rw-r--r--src/_gentoo_arches11
1 files changed, 11 insertions, 0 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