zsh-workers
 help / color / mirror / code / Atom feed
3ba06c47a35ac27c65edb47de22b02f522450f6e blob 848 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
 
# 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

if [[ $ZFTP_SYSTEM == UNIX* && $1 == */* ]]; then
  setopt localoptions clobber
  local tmpf=${TMPPREFIX}zfgm$$
  mv -f =(<<<'') $tmpf
	
  if [[ -n $WIDGET ]]; then
    local dir=${1:h}
    [[ $dir = */ ]] || dir="$dir/"
    zftp ls -LF $dir >$tmpf
    local reply
    reply=(${${${(f)"$(<$tmpf)"}##$dir}%\*})
    _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))
  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
# }
debug log:

solving 3ba06c4 ...
found 3ba06c4 in https://git.vuxu.org/mirror/zsh/

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).