zsh-workers
 help / color / mirror / code / Atom feed
From: Eric Cook <llua@gmx.com>
To: zsh-workers@zsh.org
Subject: Re: [PATCH] prevent parameters leaking from various completers
Date: Thu, 4 Jan 2018 09:07:52 -0500	[thread overview]
Message-ID: <6251d34d-2858-af67-29ff-def04e06ba0e@gmx.com> (raw)
In-Reply-To: <13713.1514998808@thecus.kiddle.eu>

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.


  reply	other threads:[~2018-01-04 16:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-26  2:17 Eric Cook
2018-01-03 17:00 ` Oliver Kiddle
2018-01-04 14:07   ` Eric Cook [this message]
2018-01-06  6:43 ` dana

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6251d34d-2858-af67-29ff-def04e06ba0e@gmx.com \
    --to=llua@gmx.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).