1
0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-11-19 21:44:11 +01:00
zsh/Completion/Unix/Command/_wget

104 lines
5.3 KiB
Plaintext
Raw Normal View History

2001-04-02 14:05:28 +02:00
#compdef wget
local curcontext="$curcontext" state line
typeset -A opt_args
_arguments -C -s \
'(--version -V)'{--version,-V}'[display version info]' \
'(--help -h)'{--help,-h}'[display help]' \
'(--background -b)'{--background,-b}'[run in background]' \
'(--execute -e)'{--execute=,-e+}'[execute .wgetrc command]:.wgetrc command' \
'(--output-file -o --append-output -a)'{--output-file=,-o+}'[specify output logfile]:log file to output:_files' \
'(--append-output -a --output-file -o)'{--append-output=,-a+}'[specify output logfile to append to]:log file to append:_files' \
'(--debug -d)'{--debug,-d}'[turn on debug output]' \
'(--quiet -q --verbose -v --non-verbose -nv)'{--quiet,-q}'[turn off output]' \
'(--quiet -q --verbose -v --non-verbose -nv)'{--verbose,-v}'[turn on verbose output]' \
'*-n+[turn off flags]:flags:->noflags' \
'(--input-file -i)'{--input-file=,-i+}'[specify input file]:file containing URLs:_files' \
'(--force-html -F)'{--force-html,-F}'[treat input file as html]' \
'(--base -B)'{--base=,-B+}'[prepend URL to relative links]:base URL:_urls' \
2001-04-02 14:05:28 +02:00
'--bind-address=:address to bind to (hostname or IP):_hosts' \
'(--tries -t)'{--tries=,-t+}'[set number of retries]:number of retries' \
'(--output-document -O)'{--output-document=,-O+}'[specify file to write documents to]:output file:_files' \
'(--continue -c)'{--continue,-c}'[continue getting an existing file]' \
2001-12-11 18:57:32 +01:00
'--progress=[set progress gauge type]:gauge type:->gauge' \
'(--timestamping -N)'{--timestamping,-N}'[retrieve only files newer than existing]' \
'(--server-response -S)'{--server-response,-S}'[print server response]' \
"--spider[don't download anything]" \
'(--timeout -T)'{--timeout=,-T+}'[specify read timeout]:read timeout (seconds)' \
'(--wait,-w)'{--wait=,-w+}'[specify wait between retrievals]:wait between retrievals (seconds)' \
2001-12-11 18:57:32 +01:00
'(--random-wait)--waitretry=:wait between retries of a retrieval (seconds)' \
'(--waitretry)--random-wait[wait from 0...2*WAIT secs between retrievals]' \
'(--proxy -Y)'{--proxy=,-Y+}'[turn proxy on or off]:proxy use:(on off)' \
'(--quota -Q)'{--quota=,-Q+}'[set retrieval quota]:number' \
2001-12-11 18:57:32 +01:00
'--limit-rate=[specify limit to download rate]:download rate limit' \
'(--force-directories -x)'{--force-directories,-x}'[force creation of directories]' \
'(--directory-prefix -P)'{--directory-prefix=,-P+}'[specify prefix to save files to]:prefix:_files -/' \
2001-04-02 14:05:28 +02:00
'--cut-dirs=:number:' \
'--http-user=:user:' \
'--http-passwd=:password:' \
'(--html-extension -E)'{--html-extension,-E}'[save all text/html files with a .html extension]' \
"--ignore-length[ignore \`Content-Length' header field]" \
2001-04-02 14:05:28 +02:00
'--header=:string:' \
'--proxy-user=:user:' \
'--proxy-passwd=:password:' \
'--referer=:url:_urls' \
'(--save-headers -s)'{--save-headers,-s}'[save http headers]' \
'(--user-agent -U)'{--user-agent=,-U+}'[specify user agent to identify as]:user-agent' \
2001-04-02 14:05:28 +02:00
'--retr-symlinks' \
'(--glob -g)'{--glob=,-g+}'[turn file globbing on or off]:glob:(on off)' \
2001-04-02 14:05:28 +02:00
'--passive-ftp' \
'(--recursive -r)'{--recursive,-r}'[recurse subdirectories]' \
'(--level -l)'{--level=,-l+}'[specify maximum recursion depth]:level' \
2001-04-02 14:05:28 +02:00
'--delete-after' \
'(--convert-links -k)'{--convert-links,-k}'[convert links to be relative]' \
'(--backup-converted -K)'{--backup-converted,-K}'[backup files before conversion]' \
'(--mirror -m -r -N -l)'{--mirror,-m}'[mirror (-r -N -l inf -nr)]' \
'(--page-requisites -p)'{--page-requisites,-p}'[get all images needed to display page]' \
'(--accept -A)'{--accept=,-A+}'[specify accepted extensions]:extensions' \
'(--reject -R)'{--reject=,-R+}'[specify rejected extensions]:extensions' \
'(--domains -D)'{--domains=,-D+}'[specify accepted domains]:domains' \
2001-04-02 14:05:28 +02:00
'--exclude-domains=:rejected domains:' \
'--follow-ftp' \
'--follow-tags=:HTML tags:' \
2002-08-09 18:05:43 +02:00
'(--ignore-tags -G)'{--ignore-tags=,-G+}'[specify ignored HTML tags]:HTML tags' \
'(--span-hosts -H)'{--span-hosts,-H}'[span hosts]' \
'(--relative -L)'{--relative,-L}'[follow relative links only]' \
'(--include-directories -I)'{--include-directories=,-I+}'[include directories]:allowed directories' \
'(--exclude-directories -X)'{--exclude-directories=,-X+}'[exclude directories]:excluded directories' \
2001-04-02 14:05:28 +02:00
'--no-host-lookup' \
'--no-parent' \
'--non-verbose' \
'--no-clobber' \
'--no-directories' \
'--no-host-directories' \
'--dont-remove-listing' \
'(--cache -C)'{--cache=,-C+}'[(dis)allow server-cached data]:cache:(on off)' \
2001-04-02 14:05:28 +02:00
'--htmlify=:htmlify:' \
'--no:no:->noflags' \
'--cookies=[turn cookies on or off]:cookies:(on off)' \
'--load-cookies=[specify file to load cookies from]:cookie file:_files' \
'--save-cookies=[specify file to save cookies to]:cookie file:_files' \
'--no-http-keep-alive[disable HTTP keep-alive]' \
'--sslcertfile=[specify client certificate]:client certificate file:_files' \
'--sslcertkey=[specify keyfile for certificate]:keyfile:_files' \
2001-12-11 18:57:32 +01:00
'--egd-file=[specify filename of EGD socket]' \
2001-04-02 14:05:28 +02:00
'*:url:_urls' && return 0
case "$state" in
2001-12-11 18:57:32 +01:00
gauge)
_values -S : 'progress gauge type' \
'dot:style:(default binary mega giga micro)' \
'bar:force:(force)'
;;
noflags)
_values -s '' 'option' \
'v[non verbose]' \
'H[no host directories]' \
'd[no directories]' \
'c[no clobber]' \
'r[don'\''t remove listing]' \
'p[no parent]'
2001-04-02 14:05:28 +02:00
;;
esac