Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: _rpm caches installed rpms
- X-seq: zsh-workers 8102
- From: Adam Spiers <adam@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh workers mailing list <zsh-workers@xxxxxxxxxxxxxx>
- Subject: PATCH: _rpm caches installed rpms
- Date: Wed, 29 Sep 1999 19:59:33 +0100
- Mail-followup-to: zsh workers mailing list <zsh-workers@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
- Reply-to: Adam Spiers <adam@xxxxxxxxxx>
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author