zsh-workers
 help / color / mirror / code / Atom feed
b609c2104b25b0bf9dc87aa3377a3b50551ce382 blob 662 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
 
# Generate an array name for storing the cache for the current session,
# storing it in fcache_name, then generate the cache for the current
# directory, or with argument -d clear the cache.

[[ $1 = -d ]] && local fcache_name

fcache_name=$zfconfig[fcache_$ZFTP_SESSION]
if [[ -z $fcache_name ]]; then
  local vals
  vals=(${(v)zfconfig[(I)fcache_*]##zftp_fcache_})
  integer i
  while [[ -n ${vals[(r)zftp_fcache_$i]} ]]; do
    (( i++ ))
  done
  fcache_name=zftp_fcache_$i
  zfconfig[fcache_$ZFTP_SESSION]=$fcache_name
fi

if [[ $1 = -d ]]; then
  unset $fcache_name
elif (( ${(P)#fcache_name} == 0 )); then
  eval "$fcache_name=(\${(f)\"\$(zftp ls)\"})"
fi
debug log:

solving b609c21 ...
found b609c21 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).