1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-12-30 19:30:58 +01:00

manual/7767

This commit is contained in:
Tanaka Akira 1999-09-10 13:57:31 +00:00
parent bc3256997b
commit b67e4abb10
28 changed files with 1121 additions and 610 deletions

View file

@ -10,18 +10,29 @@ fi
local tmpf=${TMPPREFIX}zfgm$$
if [[ $ZFTP_SYSTEM == UNIX* && $1 == */* ]]; then
# On the first argument to ls, we usually get away with a glob.
zftp ls "$1*$2" >$tmpf
reply=($(<$tmpf))
rm -f $tmpf
else
if (( $#zftp_fcache == 0 )); then
# Always cache the current directory and use it
# even if the system is UNIX.
zftp ls >$tmpf
zftp_fcache=($(<$tmpf))
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
_description expl 'remote file'
compadd "$expl[@]" -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
reply=($zftp_fcache);
else
local fcache_name
zffcache
if [[ -n $WIDGET ]]; then
_description expl 'remote file'
compadd "$expl[@]" -F fignore - ${(P)fcache_name}
else
reply=(${(P)fcache_name});
fi
fi
# }