1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-18 00:51:07 +02:00
zsh/Completion/User/_hosts
1999-09-22 12:35:20 +00:00

8 lines
254 B
Text

#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[@]"