MOON
Server: Apache/2.2.31 (Unix) mod_ssl/2.2.31 OpenSSL/0.9.8e-fips-rhel5 mod_bwlimited/1.4
System: Linux csr818.wilogic.com 2.6.18-419.el5xen #1 SMP Fri Feb 24 22:50:37 UTC 2017 x86_64
User: obrechts (544)
PHP: 5.4.45
Disabled: NONE
Upload Files
File: //usr/local/ssl/share/zsh/4.2.6/functions/_hosts
#compdef ftp ping rwho rup xping traceroute host aaaa zone mx ns soa txt

local expl hosts tmp

if ! zstyle -a ":completion:${curcontext}:hosts" hosts hosts; then
  (( $+_cache_hosts )) ||
      if (( ${+commands[getent]} )); then
	: ${(A)_cache_hosts:=${(s: :)${(ps:\t:)${(f)~~"$(_call_program hosts getent hosts 2>/dev/null)"}##[:blank:]#[^[:blank:]]#}}}
      else
        : ${(A)_cache_hosts:=${(s: :)${(ps:\t:)${${(f)~~"$(</etc/hosts)"}%%\#*}##[:blank:]#[^[:blank:]]#}}}
	if (( ${+commands[ypcat]} )) &&
	    tmp=$(_call_program hosts ypcat hosts.byname 2>/dev/null); then
          _cache_hosts+=( ${=${(f)tmp}##[:blank:]#[^[:blank:]]#} ) # If you use YP
	fi
      fi

  hosts=( "$_cache_hosts[@]" )
fi

_wanted hosts expl host \
    compadd -M 'm:{a-zA-Z}={A-Za-z} r:|.=* r:|=*' "$@" -a hosts