mirror of
git://git.code.sf.net/p/zsh/code
synced 2024-11-19 13:33:52 +01:00
Changes to _store_cache to allow cache names to contain slashes "/".
This commit is contained in:
parent
ae8f4db385
commit
114d799efd
@ -1,3 +1,8 @@
|
||||
2002-10-09 Felix Rosencrantz <f_rosencrantz@yahoo.com>
|
||||
|
||||
* 17793: Completion/Base/Utility/_store_cache: Allow / in cache
|
||||
names.
|
||||
|
||||
2002-10-07 Peter Stephenson <pws@csr.com>
|
||||
|
||||
* 17482 (Karl Tomlinson): Src/Modules/termcap.c,
|
||||
|
@ -2,7 +2,7 @@
|
||||
#
|
||||
# Storage component of completions caching layer
|
||||
|
||||
local _cache_ident
|
||||
local _cache_ident _cache_ident_dir
|
||||
_cache_ident="$1"
|
||||
|
||||
if zstyle -t ":completion:${curcontext}:" use-cache; then
|
||||
@ -13,13 +13,28 @@ if zstyle -t ":completion:${curcontext}:" use-cache; then
|
||||
if [[ -e "$_cache_dir" ]]; then
|
||||
_message "cache-dir style points to a non-directory\!"
|
||||
else
|
||||
mkdir -p "$_cache_dir"
|
||||
(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
|
||||
|
Loading…
Reference in New Issue
Block a user