about summary refs log tree commit diff
path: root/Completion/Linux
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-11-12 15:28:24 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-11-12 15:28:24 +0000
commite6282df1155e8d9b08b2e518a452c1997973f1ce (patch)
treeb0c8ed7e8512cc4397ae7df6d138ea66147565b3 /Completion/Linux
parent167b0ae3b98938f75287dcf2e112d41a03532c5f (diff)
downloadzsh-e6282df1155e8d9b08b2e518a452c1997973f1ce.tar.gz
zsh-e6282df1155e8d9b08b2e518a452c1997973f1ce.tar.xz
zsh-e6282df1155e8d9b08b2e518a452c1997973f1ce.zip
manual/8630
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