Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [PATCH] prevent parameters leaking from various completers

On 01/03/2018 12:00 PM, Oliver Kiddle wrote:
> Adding typeset -g makes the intention rather clearer. I also would
> prefer _cache_ as the initial prefix on any such variable making it
> easier to unset them en masse.

Having an completer create global parameters seems kinda dirty considering
zsh has the caching functions that could be used. The only way to invalidate
matches is to unset the parameter and that requires knowing the name, all after
realizing that the completer is caching results.

Is there an reason why the use-cache style is not true by default?

I was thinking of changing the functions that create parameters as an cache to
use the caching functions. then test if use-cache isn't set for the current context,
then set it to true.

So caching for those specific completers still happen without the user needing to do
anything and can still be invalidated after an period of time.

Messages sorted by: Reverse Date, Date, Thread, Author