|
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17 System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64 User : nobody ( 99) PHP Version : 5.2.17 Disable Function : NONE Directory : /usr/share/zsh/4.2.6/functions/ |
Upload File : |
#autoload
#
# Storage component of completions caching layer
local _cache_ident _cache_ident_dir
_cache_ident="$1"
if zstyle -t ":completion:${curcontext}:" use-cache; then
# Decide which directory to cache to, and ensure it exists
zstyle -s ":completion:${curcontext}:" cache-path _cache_dir
: ${_cache_dir:=${ZDOTDIR:-$HOME}/.zcompcache}
if [[ ! -d "$_cache_dir" ]]; then
if [[ -e "$_cache_dir" ]]; then
_message "cache-dir style points to a non-directory\!"
else
(zmodload zsh/files 2>/dev/null; mkdir -p "$_cache_dir" )
if [[ ! -d "$_cache_dir" ]]; then
_message "couldn't create cache-dir $_cache_dir"
return 1
fi
fi
fi
_cache_ident_dir="$_cache_dir/$_cache_ident"
_cache_ident_dir="$_cache_ident_dir:h"
if [[ ! -d "$_cache_ident_dir" ]]; then
if [[ -e "$_cache_ident_dir" ]]; then
_message "cache ident dir points to a non-directory:$_cache_ident_dir"
else
(zmodload zsh/files 2>/dev/null; mkdir -p "$_cache_ident_dir")
if [[ ! -d "$_cache_ident_dir" ]]; then
_message "couldn't create cache-ident_dir $_cache_ident_dir"
return 1
fi
fi
fi
shift
for var; do
case ${(Pt)var} in
(*readonly*) ;;
(*(association|array)*) print -r "$var=( ${(kv@Pqq)^^var} )";;
(*) print -r "$var=${(Pqq)^^var}";;
esac
done >! "$_cache_dir/$_cache_ident"
else
return 1
fi
return 0