public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Tim Harder" <radhermit@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/zsh-completion:master commit in: src/
Date: Sun, 21 Dec 2014 09:51:03 +0000 (UTC)	[thread overview]
Message-ID: <1419154386.14ad3adb3606e7d7f7d538ae8f7cda2f8b11d93c.radhermit@gentoo> (raw)

commit:     14ad3adb3606e7d7f7d538ae8f7cda2f8b11d93c
Author:     Tim Harder <radhermit <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 21 09:33:06 2014 +0000
Commit:     Tim Harder <radhermit <AT> gentoo <DOT> org>
CommitDate: Sun Dec 21 09:33:06 2014 +0000
URL:        http://sources.gentoo.org/gitweb/?p=proj/zsh-completion.git;a=commit;h=14ad3adb

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.

---
 src/_gentoo_arches | 11 +++++++++++
 src/_portage_utils | 13 +------------
 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 \


             reply	other threads:[~2014-12-21  9:51 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-21  9:51 Tim Harder [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-07-08 19:25 [gentoo-commits] proj/zsh-completion:master commit in: src/ Mike Gilbert
2023-01-17 14:45 Vadim Misbakh-Soloviov
2022-01-12  9:35 Vadim Misbakh-Soloviov
2022-01-12  9:35 Vadim Misbakh-Soloviov
2020-09-14  3:13 Vadim Misbakh-Soloviov
2020-09-14  3:13 Vadim Misbakh-Soloviov
2020-09-14  3:13 Vadim Misbakh-Soloviov
2020-09-14  3:13 Vadim Misbakh-Soloviov
2020-02-19 18:51 Vadim Misbakh-Soloviov
2020-02-19 18:47 Vadim Misbakh-Soloviov
2020-02-19 18:47 Vadim Misbakh-Soloviov
2020-02-19 18:47 Vadim Misbakh-Soloviov
2020-02-19 18:47 Vadim Misbakh-Soloviov
2020-02-19 18:47 Vadim Misbakh-Soloviov
2020-02-19 17:53 Vadim Misbakh-Soloviov
2020-02-19 17:53 Vadim Misbakh-Soloviov
2020-02-19 17:53 Vadim Misbakh-Soloviov
2015-04-28 14:56 Vadim A. Misbakh-Soloviov
2015-04-28 12:07 Vadim A. Misbakh-Soloviov
2015-04-28 12:07 Vadim A. Misbakh-Soloviov
2014-12-22 22:57 Tim Harder
2014-12-21  9:51 Tim Harder
2014-12-20 23:22 Tim Harder
2014-12-20 22:29 Tim Harder
2014-12-20 20:04 Tim Harder
2014-12-20 20:04 Tim Harder
2014-12-20 20:04 Tim Harder
2014-12-20  5:31 Tim Harder
2014-12-20  4:54 Tim Harder
2014-12-20  4:39 Tim Harder
2014-12-20  4:39 Tim Harder
2014-12-20  3:21 Tim Harder
2014-12-20  3:08 Tim Harder
2014-12-20  3:08 Tim Harder
2014-12-20  3:08 Tim Harder
2014-12-20  2:35 Tim Harder
2014-12-20  2:15 Tim Harder
2014-12-20  2:15 Tim Harder
2014-12-18 16:59 Tim Harder
2014-12-18 16:59 Tim Harder
2014-12-18 16:59 Tim Harder
2014-12-01  7:48 Tim Harder
2014-12-01  7:48 Tim Harder
2014-12-01  7:34 Tim Harder
2014-12-01  7:34 Tim Harder
2014-11-27  7:23 Tim Harder
2014-11-27  7:23 Tim Harder
2014-11-27  6:39 Tim Harder
2014-11-24  9:13 Vadim A. Misbakh-Soloviov
2014-11-24  7:33 Tim Harder
2014-11-24  7:33 Tim Harder
2014-11-23 21:35 Vadim A. Misbakh-Soloviov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1419154386.14ad3adb3606e7d7f7d538ae8f7cda2f8b11d93c.radhermit@gentoo \
    --to=radhermit@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox