#compdef links local curcontext="$curcontext" state line typeset -A opt_args _arguments -C \ '-async-dns[Asynchronous DNS resolver]:bool:(0 1)' \ '-max-connections[Maximum number of concurrent connections.]:max:' \ '-max-connections-to-host[Maximum number of concurrent connection to a given host.]:max:' \ '-retries[Number of retries.]:retries:' \ '-receive-timeout[Timeout on receive.]:secs:' \ '-unrestartable-receive-timeout[Timeout on non restartable connections.]:secs:' \ '-format-cache-size[Number of formatted document pages cached.]:pages:' \ '-memory-cache-size[Cache memory in bytes.]:kilobytes:' \ '-image-cache-size[Cache memory in bytes.]:kilobytes:'\ '-http-proxy[Host and port number of the HTTP proxy, or blank.]:hostport:_hosts' \ '-ftp-proxy[Host and port number of the FTP proxy, or blank.]:hostport:_hosts' \ '-download-dir[Default download directory.]:_files -/' \ '-assume-codepage[Use the given codepage when the webpage did not specify its codepage.]:codepage:' \ '-anonymous[Restrict links so that it can run on an anonymous account.]' \ '-no-connect[Runs links as a separate instance - instead of connecting to existing instance.]' \ '-version[Prints the version number.]' \ '-help[Display help]' \ '-g[Run in graphics mode]'\ '-driver[Graphics driver to use.]:drivers:(x svgalib fb pmshell atheos)'\ '-mode[Graphics mode.]:mode:'\ ':url:->html' && return 0 case "$state" in html) _files -g '*.html' || _urls ;; esac