1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-11-06 08:01:01 +01:00
zsh/Completion/User/_hosts
1999-09-06 18:36:15 +00:00

8 lines
261 B
Text

#compdef ftp ncftp ping rwho rup xping traceroute telnet
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[@]"