1
0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-11-20 14:04:03 +01:00
zsh/Completion/User/_archie

34 lines
1.0 KiB
Plaintext
Raw Normal View History

1999-10-16 07:13:05 +02:00
#compdef archie
local curcontext="$curcontext" state line expl
1999-10-16 07:13:05 +02:00
typeset -A opt_args
_arguments -C -s \
'-D+[debug level]:debug level:' \
1999-10-16 07:13:05 +02:00
'-v[print version]' \
'-V[verbose mode]' \
'-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]' \
'-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:' \
':string:' && return 0
1999-10-16 07:13:05 +02:00
case "$state" in
serverhost)
: ${(A)archie_servers:=${(M)$(_call hosts archie -L):#archie.*}}
_wanted hosts expl 'archie servers' compadd - $archie_servers && return 0
1999-10-16 07:13:05 +02:00
;;
esac
return 1