From 0d0a134822e10de5946bb34720c8c0ca0518207c Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Mon, 5 Jun 2000 23:20:48 +0000 Subject: accept -g option in _urls and use _urls in _rpm (11756) --- Completion/Linux/_rpm | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'Completion/Linux') diff --git a/Completion/Linux/_rpm b/Completion/Linux/_rpm index 344f5269b..e17fa9c5c 100644 --- a/Completion/Linux/_rpm +++ b/Completion/Linux/_rpm @@ -211,12 +211,14 @@ while [[ -n "$state" ]]; do _files -g \*.spec && ret=0 ;; package_file) - if compset -P '(f|ht)tp://'; then - _hosts -S/ && ret=0 + _wanted files expl 'RPM package file' \ + _files -g '*.(#i)rpm' && ret=0 + if [[ -prefix 1 (f|ht)tp:// ]]; then + _wanted urls expl 'URL of RPM package file' \ + _urls -f -g '*.(#i)rpm' "${expl[@]}" && ret=0 else - _alternative \ - 'files:RPM package file:_files -g \*.\(\#i\)rpm' \ - 'prefixes:URL prefix:compadd ftp:// http://' && ret=0 + _wanted urls expl 'URL of RPM package file' \ + compadd -S '' "${expl[@]}" ftp:// http:// && ret=0 fi ;; package_src) -- cgit 1.4.1