MOON
Server: Apache/2.2.34 (Unix) mod_ssl/2.2.34 OpenSSL/0.9.8e-fips-rhel5 mod_bwlimited/1.4 FrontPage/5.0.2.2635
System: Linux server.asjudinet.com 2.6.32-042stab141.3 #1 SMP Fri Nov 15 22:45:34 MSK 2019 i686
User: asjudine (504)
PHP: 5.2.17
Disabled: NONE
Upload Files
File: //usr/share/zsh/4.2.6/functions/zfget_match
# function zfget_match {

emulate -L zsh

# the zfcd hack:  this may not be necessary here
if [[ $1 == $HOME || $1 == $HOME/* ]]; then
  1="~${1#$HOME}"
fi

local tmpf=${TMPPREFIX}zfgm$$

if [[ $ZFTP_SYSTEM == UNIX* && $1 == */* ]]; then
  if [[ -n $WIDGET ]]; then
    local dir=${1:h}
    [[ $dir = */ ]] || dir="$dir/"
    zftp ls -LF $dir >$tmpf
    local reply
    reply=(${${${(f)"$(<$tmpf)"}##$dir}%\*})
    rm -f $tmpf
    _wanted files expl 'remote file' compadd -P $dir - $reply
  else
    # On the first argument to ls, we usually get away with a glob.
    zftp ls "$1*$2" >$tmpf
    reply=($(<$tmpf))
    rm -f $tmpf
  fi
else
  local fcache_name
  zffcache
  if [[ -n $WIDGET ]]; then
    _wanted files expl 'remote file' compadd -F fignore - ${(P)fcache_name}
  else
    reply=(${(P)fcache_name});
  fi
fi
# }