summaryrefslogtreecommitdiff
path: root/Completion/User/_wget
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2000-05-05 13:38:45 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2000-05-05 13:38:45 +0000
commit9f9b6e165516c4ee59b1f5b609a6890ccc3d598f (patch)
tree86460ad1a9886e6030fc1b1d1aee57668f28aa01 /Completion/User/_wget
parent04118530d4157d3494349e2628246b78465e08f8 (diff)
downloadzsh-9f9b6e165516c4ee59b1f5b609a6890ccc3d598f.tar.gz
zsh-9f9b6e165516c4ee59b1f5b609a6890ccc3d598f.zip
completion function cleanup for `_arguments' with the `-C' option and using it's return value (11195)
Diffstat (limited to 'Completion/User/_wget')
-rw-r--r--Completion/User/_wget27
1 files changed, 12 insertions, 15 deletions
diff --git a/Completion/User/_wget b/Completion/User/_wget
index 0e56df355..fbacc5b27 100644
--- a/Completion/User/_wget
+++ b/Completion/User/_wget
@@ -1,11 +1,11 @@
#compdef wget
-local state line
-typeset -A options
+local curcontext="$curcontext" state line
+typeset -A opt_args
local tmp1 tmp2
-_arguments -s \
+_arguments -C -s \
'(--version)-V[version]' '(-V)--version' \
'(--help)-h[help]' '(-h)--help' \
'(--background)-b[background]' '(-b)--background' \
@@ -68,7 +68,7 @@ _arguments -s \
'--cache=:cache:(on off)' \
'--htmlify=:htmlify:' \
'--no:no:->noflags' \
- '*:url:_urls'
+ '*:url:_urls' && return 0
# '--backups:backups:' \
# '-W' \
@@ -78,16 +78,13 @@ _arguments -s \
case "$state" in
noflags)
- tmp1=(
- 'v:non verbose'
- 'h:no host lookup'
- 'H:no host directories'
- 'd:no directories'
- 'c:no clobber'
- 'r:don'\''t remove listing'
- 'p:no parent'
- )
- tmp2=(${PREFIX}${^tmp1%%:*})
- _describe -o option tmp1 tmp2
+ _values -s '' 'option' \
+ 'v[non verbose]' \
+ 'h[no host lookup]' \
+ 'H[no host directories]' \
+ 'd[no directories]' \
+ 'c[no clobber]' \
+ 'r[don'\''t remove listing]' \
+ 'p[no parent]'
;;
esac