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/_rpm12
1 files changed, 11 insertions, 1 deletions
diff --git a/Completion/Linux/_rpm b/Completion/Linux/_rpm
index 5b59f1d2b..15f154db9 100644
--- a/Completion/Linux/_rpm
+++ b/Completion/Linux/_rpm
@@ -43,7 +43,7 @@ local ret=1 tmp expl
 
 # Used by `_arguments', made local here.
 
-local state lstate line
+local context state lstate line
 typeset -A opt_args
 
 state=''
@@ -187,13 +187,19 @@ while [[ -n "$state" ]]; do
     state=package_file
     ;&
   package)
+    _tags "$context" packages || return 1
+
     _description expl 'RPM package'
     compadd "$expl[@]" -M 'r:|-=* r:|=*' - $(rpm -qa) && ret=0
     ;;
   package_file)
     if compset -P ftp://; then
+      _tags "$context" hosts || return 1
+
       _hosts -S/ && ret=0
     else
+      _tags "$context" files || return 1
+
       _description expl 'RPM package file'
       _files "$expl[@]" -g '*.(#i)rpm' && ret=0
       _description expl 'ftp URL prefix'
@@ -202,6 +208,8 @@ while [[ -n "$state" ]]; do
     ;;
   tags)
     if compset -P '*\{'; then
+      _tags "$context" tags || return 1
+
       _description expl 'RPM tag'
       compadd "$expl[@]" -M 'm:{a-z}={A-Z}' -S '}' - \
               "${(@)${(@f)$(rpm --querytags)}#RPMTAG_}" && ret=0
@@ -219,6 +227,8 @@ while [[ -n "$state" ]]; do
       _description expl 'old path'
     fi
 
+    _tags "$context" directories || return 1
+
     _files "$expl[@]" -/ && ret=0
     ;;
   esac