mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-13 23:31:08 +02:00
13 lines
386 B
Text
13 lines
386 B
Text
#compdef ftp ncftp ping rwho rup xping traceroute host
|
|
|
|
local expl hosts
|
|
|
|
if ! _style -a hosts hosts hosts; then
|
|
(( $+_cache_hosts )) ||
|
|
: ${(A)_cache_hosts:=${(s: :)${(ps:\t:)${${(f)"$(</etc/hosts)"}%%\#*}##[:blank:]#[^[:blank:]]#}}}
|
|
|
|
hosts=( "$_cache_hosts[@]" )
|
|
fi
|
|
|
|
_wanted hosts expl host &&
|
|
compadd -M 'm:{a-zA-Z}={A-Za-z} r:|.=* r:|=*' "$@" "$expl[@]" - "$hosts[@]"
|