about summary refs log tree commit diff
path: root/Completion/Linux
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Linux')
-rw-r--r--Completion/Linux/_rpm5
1 files changed, 4 insertions, 1 deletions
diff --git a/Completion/Linux/_rpm b/Completion/Linux/_rpm
index 5f6843267..70de704d0 100644
--- a/Completion/Linux/_rpm
+++ b/Completion/Linux/_rpm
@@ -188,7 +188,10 @@ while [[ -n "$state" ]]; do
     ;&
   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