From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12757 invoked from network); 9 Oct 2002 04:22:39 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 9 Oct 2002 04:22:39 -0000 Received: (qmail 14585 invoked by alias); 9 Oct 2002 04:22:27 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 17793 Received: (qmail 14573 invoked from network); 9 Oct 2002 04:22:26 -0000 Message-ID: <20021009042223.2821.qmail@web10411.mail.yahoo.com> Date: Tue, 8 Oct 2002 21:22:23 -0700 (PDT) From: Felix Rosencrantz Subject: PATCH: _store_cache allows cache names to contain / To: zsh-workers@sunsite.auc.dk MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii I mentioned this change some time back, to allow cache names to be pathnames. Here is the patch: Index: Completion/Base/Utility/_store_cache =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/Base/Utility/_store_cache,v retrieving revision 1.2 diff -u -r1.2 _store_cache --- Completion/Base/Utility/_store_cache 16 Apr 2002 07:48:45 -0000 1.2 +++ Completion/Base/Utility/_store_cache 8 Oct 2002 06:31:44 -0000 @@ -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 [[ -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 __________________________________________________ Do you Yahoo!? Faith Hill - Exclusive Performances, Videos & More http://faith.yahoo.com