diff options
author | Oliver Kiddle <opk@users.sourceforge.net> | 2000-06-05 23:20:48 +0000 |
---|---|---|
committer | Oliver Kiddle <opk@users.sourceforge.net> | 2000-06-05 23:20:48 +0000 |
commit | 0d0a134822e10de5946bb34720c8c0ca0518207c (patch) | |
tree | 68e3e70721b07ce9c41284a2cd68d3dab43024fd /Completion/Linux/_rpm | |
parent | 4e9967dcca02695eb5a62dc15b43e6123329d909 (diff) | |
download | zsh-0d0a134822e10de5946bb34720c8c0ca0518207c.tar.gz zsh-0d0a134822e10de5946bb34720c8c0ca0518207c.tar.xz zsh-0d0a134822e10de5946bb34720c8c0ca0518207c.zip |
accept -g option in _urls and use _urls in _rpm (11756)
Diffstat (limited to 'Completion/Linux/_rpm')
-rw-r--r-- | Completion/Linux/_rpm | 12 |
1 files changed, 7 insertions, 5 deletions
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) |