1999-10-16 07:13:05 +02:00
|
|
|
#compdef archie
|
|
|
|
|
2000-05-05 15:38:45 +02:00
|
|
|
local curcontext="$curcontext" state line expl
|
1999-10-16 07:13:05 +02:00
|
|
|
typeset -A opt_args
|
|
|
|
|
2000-05-05 15:38:45 +02:00
|
|
|
_arguments -C -s \
|
|
|
|
'-D+[debug level]:debug level:' \
|
1999-10-16 07:13:05 +02:00
|
|
|
'-v[print version]' \
|
|
|
|
'-V[verbose mode]' \
|
2000-05-05 15:38:45 +02:00
|
|
|
'-O+[specifies offset]:offset:' \
|
1999-10-16 07:13:05 +02:00
|
|
|
'-a[list matches as Alex filenames]' \
|
|
|
|
'-c[case sensitive substring search]' \
|
|
|
|
'-e[exact string match (default)]' \
|
|
|
|
'-r[regular expression search]' \
|
|
|
|
'-s[case insensitive substring search]' \
|
|
|
|
'-l[list one match per line]' \
|
|
|
|
'-t[sort inverted by date]' \
|
2000-05-05 15:38:45 +02:00
|
|
|
'-m+[specifies maximum number of hits to return (default 95)]:hits to return:' \
|
|
|
|
'-o+[specifies file to store results in]:file to store:' \
|
|
|
|
'-h+[specifies server host]:server host:->serverhost' \
|
1999-10-16 07:13:05 +02:00
|
|
|
'-L[list known servers and current default]' \
|
|
|
|
'-N-[specifies query niceness level (0-35765)]:niceness level:' \
|
2000-05-05 15:38:45 +02:00
|
|
|
':string:' && return 0
|
1999-10-16 07:13:05 +02:00
|
|
|
|
|
|
|
case "$state" in
|
|
|
|
serverhost)
|
2000-05-05 15:38:45 +02:00
|
|
|
: ${(A)archie_servers:=${(M)$(_call hosts archie -L):#archie.*}}
|
|
|
|
|
2000-05-31 11:38:25 +02:00
|
|
|
_wanted hosts expl 'archie servers' compadd -a archie_servers && return 0
|
1999-10-16 07:13:05 +02:00
|
|
|
;;
|
|
|
|
esac
|
2000-05-05 15:38:45 +02:00
|
|
|
|
|
|
|
return 1
|