about summary refs log tree commit diff
path: root/Completion/User/_wget
blob: 0e56df355f581302056a677bb2b4a3fb6f30223e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
#compdef wget

local state line
typeset -A options

local tmp1 tmp2

_arguments -s \
  '(--version)-V[version]' '(-V)--version' \
  '(--help)-h[help]' '(-h)--help' \
  '(--background)-b[background]' '(-b)--background' \
  {'(--execute)-e+[execute]','(-e)--execute='}':.wgetrc command:' \
  {'(--output-file)-o+[output file]','(-o)--output-file='}':log file to output:_files' \
  {'(--append-output)-a+[append output file]','(-a)--append-output='}':log file to append:_files' \
  '(--debug)-d[debug]' '(-d)--debug' \
  '(--quiet)-q[quiet]' '(-q)--quiet' \
  '(--verbose)-v[verbose]' '(-v)--verbose' \
  '*-n+[no]:flags:->noflags' \
  {'(--input-file)-i+[input file]','(-i)--input-file='}':file containing URLs:_files' \
  '(--force-html)-F[force html]' '(-F)--force-html' \
  {'(--tries)-t+[tries]','(-t)--tries='}':number of retries:(0)' \
  {'(--output-document)-O+[output document]','(-O)--output-document='}':output file:_files' \
  '(--continue)-c[continue]' '(-c)--continue' \
  '--dot-style=:display style:(default binary mega giga micro)' \
  '(--timestamping)-N[timestamping]' '(-N)--timestamping' \
  '(--server-response)-S[server response]' '(-S)--server-response' \
  '--spider' \
  {'(--timeout)-T+[timeout]','(-T)--timeout='}':read timeout(seconds):' \
  {'(--wait)-w+[wait]','(-w)--wait='}':wait between retrievals(seconds):' \
  {'(--proxy --use-proxy)-Y+[proxy]','(-Y --use-proxy)--proxy=','(-Y --proxy)--use-proxy='}':proxy:(on off)' \
  {'(--quota)-Q+[quota]','(-Q)--quota='}':number:' \
  '(--force-directories)-x[force directories]' '(-x)--force-directories' \
  {'(--directory-prefix)-P+[directory prefix]','(-P)--directory-prefix='}':prefix:_files -/' \
  '--cut-dirs=:number:' \
  '--http-user=:user:' \
  '--http-passwd=:password:' \
  '--ignore-length' \
  '--header=:string:' \
  '--proxy-user=:user:' \
  '--proxy-passwd=:password:' \
  '(--save-headers)-s[save headers]' '(-s)--save-headers' \
  {'(--user-agent)-U+[user agent]','(-U)--user-agent='}':user-agent:' \
  '--retr-symlinks' \
  {'(--glob)-g+[glob]','(-g)--glob='}':glob:(on off)' \
  '--passive-ftp' \
  '(--recursive)-r[recursive]' '(-r)--recursive' \
  {'(--level)-l+[level]','(-l)--level='}':level:(0)' \
  '--delete-after' \
  '(--convert-links)-k[convert links]' '(-k)--convert-links' \
  '(--mirror)-m[mirror]' '(-m)--mirror' \
  {'(--accept)-A+[accept]','(-A)--accept='}':accepted etensions:' \
  {'(--reject)-R+[reject]','(-R)--reject='}':rejected etensions:' \
  {'(--domains)-D+[domains]','(-D)--domains='}':accepted domains:' \
  '--exclude-domains=:rejected domains:' \
  '(--relative)-L[relative]' '(-L)--relative' \
  '--follow-ftp' \
  '(--span-hosts)-H[span hosts]' '(-H)--span-hosts' \
  {'(--include-directories)-I+[include directories]','(-I)--include-directories='}':allowed directories:' \
  {'(--exclude-directories)-X+[exclude directories]','(-X)--exclude-directories='}':excluded directories:' \
  {'(--base)-B+[base]','(-B)--base='}':base:' \
  '--no-host-lookup' \
  '--no-parent' \
  '--non-verbose' \
  '--no-clobber' \
  '--no-directories' \
  '--no-host-directories' \
  '--dont-remove-listing' \
  '--cache=:cache:(on off)' \
  '--htmlify=:htmlify:' \
  '--no:no:->noflags' \
  '*:url:_urls'

#  '--backups:backups:' \
#  '-W' \
#  '(--email-address)-E+[email address]' '(-E)--email-address' \
#  '-C+[cache]:cache:(on off)' \
#  '--force-hier' \

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
  ;;
esac