zsh-workers
 help / color / mirror / code / Atom feed
From: Adam Spiers <adam@thelonious.new.ox.ac.uk>
To: zsh workers mailing list <zsh-workers@sunsite.auc.dk>
Subject: PATCH: _rpm caches installed rpms
Date: Wed, 29 Sep 1999 19:59:33 +0100	[thread overview]
Message-ID: <19990929195933.A15944@thelonious.new.ox.ac.uk> (raw)

I'm personally a fan of caching (sp?).  Others may not be; should it
be configurable?  In any case, the cache can easily be force-rebuilt.

Index: Completion/Linux/_rpm
===================================================================
RCS file: /usr/local/cvsroot/zsh/Completion/Linux/_rpm,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 _rpm
--- Completion/Linux/_rpm	1999/09/21 12:15:42	1.1.1.1
+++ Completion/Linux/_rpm	1999/09/29 18:35:40
@@ -188,7 +188,10 @@
     ;&
   package)
     _description expl 'RPM package'
-    compadd "$expl[@]" -M 'r:|-=* r:|=*' - $(rpm -qa) && ret=0
+    if (( ! $+installed_rpms )); then
+      installed_rpms=( $(rpm -qa) )
+    fi
+    compadd "$expl[@]" -M 'r:|-=* r:|=*' - $installed_rpms && ret=0
     ;;
   package_file)
     if compset -P ftp://; then


             reply	other threads:[~1999-09-29 18:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-09-29 18:59 Adam Spiers [this message]
1999-09-30  9:51 ` Zefram
1999-09-30 18:32   ` Adam Spiers

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=19990929195933.A15944@thelonious.new.ox.ac.uk \
    --to=adam@thelonious.new.ox.ac.uk \
    --cc=adam@spiers.net \
    --cc=zsh-workers@sunsite.auc.dk \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).