Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: completion caching layer
- X-seq: zsh-workers 12473
- From: Adam Spiers <adam@xxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: Re: PATCH: completion caching layer
- Date: Wed, 2 Aug 2000 00:37:07 +0100
- In-reply-to: <1000801170332.ZM30820@xxxxxxxxxxxxxxxxxxxxxxx>; from schaefer@xxxxxxxxxxxxxxxxxxxxxxx on Tue, Aug 01, 2000 at 05:03:32PM +0000
- Mail-followup-to: zsh-workers@xxxxxxxxxxxxxx
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <200007270800.KAA15656@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <20000801173152.A9212@xxxxxxxxxxxxxxxxxxxxxxx> <1000801170332.ZM30820@xxxxxxxxxxxxxxxxxxxxxxx>
- Reply-to: Adam Spiers <adam@xxxxxxxxxx>
Bart Schaefer (schaefer@xxxxxxxxxxxxxxxxxxxxxxx) wrote:
> On Aug 1, 5:31pm, Adam Spiers wrote:
> } Subject: PATCH: completion caching layer
> }
> } +findex(_retrieve_cache)
> } +item(tt(_retrieve_cache) var(cache_identifier))(
> } +This function retrieves completion information from the file given by
> } +var(cache_identifier), stored in a directory specified by the
> } +tt(cache-path) style (defaults to tt(~/.zsh/cache)).
>
> I'd prefer that the cache location be relative to $ZDOTDIR rather than
> relative to $HOME, and that it not be two levels removed, e.g. use
> $ZDODTIR/.zcompcache/ rather than ~/.zsh/cache/. That'd be consistent
> with e.g. .zcompdump.
Sure, change applied, so will appear in the commit. Makes no
difference to me; I already had
zstyle ':completion::complete:*' cache-path ~/.zsh/cache/$HOST
in my .zshrc because my home directory is mounted via NFS so I need a
different cache path for each machine (for perldoc and rpm at least).
> } + # grr, doesn't work, so we have to roll our own
> } +# typeset "$@[2,-1]" > "$_cache_dir/$_cache_ident"
>
> Isn't
>
> typeset +g "$@[2,-1]" > "$_cache_dir/$_cache_ident"
Ah, +g! I was looking for that.
> what you want? Or maybe
>
> while (($# > 1)); do
> shift
> ${(P)=1:+typeset $1}
> done > "$_cache_dir/$_cache_ident"
>
> would be more accurate?
Is that better than what you suggested via private mail?
Messages sorted by:
Reverse Date,
Date,
Thread,
Author