From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18719 invoked from network); 29 Sep 1999 18:59:38 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 29 Sep 1999 18:59:38 -0000 Received: (qmail 16284 invoked by alias); 29 Sep 1999 18:59:34 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 8102 Received: (qmail 16277 invoked from network); 29 Sep 1999 18:59:34 -0000 Date: Wed, 29 Sep 1999 19:59:33 +0100 From: Adam Spiers To: zsh workers mailing list Subject: PATCH: _rpm caches installed rpms Message-ID: <19990929195933.A15944@thelonious.new.ox.ac.uk> Reply-To: Adam Spiers Mail-Followup-To: zsh workers mailing list Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre2i X-URL: http://www.new.ox.ac.uk/~adam/ X-OS: Linux 2.2.9 i686 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