From e6282df1155e8d9b08b2e518a452c1997973f1ce Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Fri, 12 Nov 1999 15:28:24 +0000 Subject: manual/8630 --- Completion/Linux/_rpm | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'Completion/Linux') 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 -- cgit 1.4.1