mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-25 17:20:25 +02:00
11 lines
332 B
Text
11 lines
332 B
Text
#compdef ftp ncftp ping rwho rup xping traceroute
|
|
|
|
local expl
|
|
|
|
: ${(A)hosts:=${(s: :)${(ps:\t:)${${(f)"$(</etc/hosts)"}%%\#*}##[:blank:]#[^[:blank:]]#}}}
|
|
|
|
# Let the user add her own hosts in if she wants
|
|
hosts=( $hostnames $hosts )
|
|
|
|
_description expl host
|
|
compadd -M 'm:{a-zA-Z}={A-Za-z} r:|.=* r:|=*' "$@" "$expl[@]" - "$hosts[@]"
|