[links-list] zsh compdef _links

Calum Selkirk cselkirk at sophix.uklinux.net
Sat Feb 17 11:15:22 PST 2001


hi ..

attatched is a compdef _links for zsh (new completion system). Just
drop it into $fpath for links filename/URL completion. I only spent a
few minutes knocking it out so any comments on it are welcome (zsh
users?). 

Mikulas, Cliff .. please feel free to include it in links contrib and or
doc/user-guide/examples.

yours

calum 
-------------- next part --------------
#compdef links

local curcontext="$curcontext" state line 
typeset -A opt_args

_arguments -C \
  '*:location:->url' \
  '-anonymous' \
  '-assume-codepage:CODEPAGE:' \
  '-async-dns:[0||1]:' \
  '-download-dir:DIRECTORY:_path_files:' \
  '-format-cache-size:NUMBER:' \
  '-ftp-proxy:HOST\:PORT:' \
  '-help' \
  '-http-proxy:HOST\:PORT:' \
  '-max-connections:MAXIMUM CONCURRENT CONNECTIONS (default\: 10):' \
  '-max-connections-to-host:MAXIMUM CONCURRENT CONNECTIONS TO A GIVEN HOST:' \
  '-memory-cache-size:KBYTES (default\: 1024):' \
  '-no-connect' \
  '-receive-timeout:NUMBER IN SECONDS:' \
  '-retries:NUMBER OF RETRIES:' \
  '-unrestartable-receive-timeout:NUMBER IN SECONDS:' \
  '-version' && return 0

case "$state" in

url)
  _files -g '*.html' || _urls
  ;;
esac 


More information about the links-list mailing list