blob: 9f5a39cca2c8d4e265776ccacdd8dc83f99fa5c0 (
plain) (
blame)
1
2
3
4
5
6
7
8
|
#compdef ftp ncftp ping rwho rup xping traceroute
local expl
: ${(A)hosts:=${(s: :)${(ps:\t:)${${(f)"$(</etc/hosts)"}%%\#*}##[:blank:]#[^[:blank:]]#}}}
_description expl host
compadd -M 'm:{a-zA-Z}={A-Za-z} r:|.=* r:|=*' "$@" "$expl[@]" - "$hosts[@]"
|