Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: _wget
- X-seq: zsh-workers 7888
- From: Tanaka Akira <akr@xxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: PATCH: _wget
- Date: 17 Sep 1999 09:58:25 +0900
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
This is a completion function for wget.
--- /dev/null Fri Sep 17 09:49:00 1999
+++ Completion/User/_wget Fri Sep 17 08:27:05 1999
@@ -0,0 +1,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
--
Tanaka Akira
Messages sorted by:
Reverse Date,
Date,
Thread,
Author