about summary refs log tree commit diff
path: root/Completion/Linux
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-10-17 04:52:56 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-10-17 04:52:56 +0000
commit6014bbdb459e30aee0f5ec4a7e0bdfb43a264adf (patch)
treed04738e985ed498621fb5f4930ffd4ce0143ee42 /Completion/Linux
parentbf23cb8fe738c1fcd2c1b8a458f4316a3b782652 (diff)
downloadzsh-6014bbdb459e30aee0f5ec4a7e0bdfb43a264adf.tar.gz
zsh-6014bbdb459e30aee0f5ec4a7e0bdfb43a264adf.tar.xz
zsh-6014bbdb459e30aee0f5ec4a7e0bdfb43a264adf.zip
zsh-3.1.6-bart-7 zsh-3.1.6-bart-7
Diffstat (limited to 'Completion/Linux')
-rw-r--r--Completion/Linux/_rpm9
1 files changed, 3 insertions, 6 deletions
diff --git a/Completion/Linux/_rpm b/Completion/Linux/_rpm
index a09d16587..f54f77522 100644
--- a/Completion/Linux/_rpm
+++ b/Completion/Linux/_rpm
@@ -148,7 +148,7 @@ while [[ -n "$state" ]]; do
       '*:RPM package:->package' && ret=0
     ;;
   build_b)
-    tmp=( '*:spec file:_files -g \*.spec' )
+    tmp=( '*:spec file:_path_files -/ -g \*.spec' )
     ;&
   build_t)
     (( $#tmp )) || tmp=( '*:tar file:_files -g \*.\(\#i\)tar\(.\*\|\)' )
@@ -188,17 +188,14 @@ while [[ -n "$state" ]]; do
     ;&
   package)
     _description expl 'RPM package'
-    if (( ! $+installed_rpms )); then
-      installed_rpms=( $(rpm -qa) )
-    fi
-    compadd "$expl[@]" -M 'r:|-=* r:|=*' - $installed_rpms && ret=0
+    compadd "$expl[@]" -M 'r:|-=* r:|=*' - $(rpm -qa) && ret=0
     ;;
   package_file)
     if compset -P ftp://; then
       _hosts -S/ && ret=0
     else
       _description expl 'RPM package file'
-      _files "$expl[@]" -g '*.(#i)rpm' && ret=0
+      _path_files "$expl[@]" -/ -g '*.(#i)rpm' && ret=0
       _description expl 'ftp URL prefix'
       compadd "$expl[@]" ftp://
     fi