From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28024 invoked by alias); 4 Jan 2018 16:52:24 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 42220 Received: (qmail 12456 invoked by uid 1010); 4 Jan 2018 16:52:24 -0000 X-Qmail-Scanner-Diagnostics: from mout.gmx.net by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(212.227.15.19):SA:0(-2.6/5.0):. Processed in 1.271948 secs); 04 Jan 2018 16:52:24 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H2,SPF_PASS autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: llua@gmx.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Subject: Re: [PATCH] prevent parameters leaking from various completers To: zsh-workers@zsh.org References: <20171226021740.81700-1-llua@gmx.com> <13713.1514998808@thecus.kiddle.eu> From: Eric Cook Message-ID: <6251d34d-2858-af67-29ff-def04e06ba0e@gmx.com> Date: Thu, 4 Jan 2018 09:07:52 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <13713.1514998808@thecus.kiddle.eu> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:Wi5E6LDsBKiSzXUZcxyQkVxyiS6fCUGyWVcuNE3JNz7QDG3U4Il MARkK2MOhtRdft5tG96ff1TcC0YvOuY8KVowVErWnSvGym4VKTnLF6B4Z6i+gn6TsoIAAlA zWLWHAMCTN9hBZIddU7IHcqF0QiFAtsioS2NL+/XSh/N9DmY/KbIPI7nbCoW84Fox8Fxh33 gtx5D68qjPZAgznoyChuQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:rxco92IBax0=:sYICyUQTouGTrs8auoUxwg T3ogemWjeETQTPp+6rxEZOoybIDFJbj3Vpo2u1HfnqkCtPY/gQd3wkvN+zIibOvuA07U5RQ4n 1rpIsgzkW9mVNOjiTgSM26sAJZJeETecTt+8jW3geKeyIsuhGkhfp+WUDYaj0PX0DTvgx+svD flIP/5v0ax2wBhhpXY+G3FmFPCBmz/yI+L0LpRW8bASqIECCgTNXFlk5b9WejnUIaG5fFSWGg d3J5cNxBT5BcfBAVZMw2E3Ctf4RWkEadXSQYqjJhorXCtBp58QhoHKmIc1JElb7NiSGm5uUvS r05Y2+xUPlohj8BCGNybHW0QZ7G1tgYOheG2Q3abcYgsustrny6Ooha3upJuMkiSQ5wrgh/qN +Iz3zcA2mL6peeJGd72E2cPDPJmtUYUvjVW02ARH7rKOeARUEh44YCxumdBZpUICxaqNnbPjQ 3esO1cBDv0UUXGjEhk+UX2eU8BNzU1bpjacRw7Oy+DgnJmQAt33s4WQUJiAEUxrGDYkw+nI1B e91G8F/jWL0xkiTCNO2YiD3m0vaW1Yp9M+hZHYP1+9zcTj2Da1ofWHUgpuphH4shVVZRtItZ3 VkUNSW/sBT+gnayuhecUaXn/65LO7+hBA4xJWcfDnY9n3JzEq/R+AK8ZqPFJ3B/3Bld1OTECE xYXA62rzqM/AksgYRQJcWLiHBkSDjTS4pDCGigzE60apxnhE+cFaC7Fv67slwGJC6ubYU6KdX ug28l+liEq2AWTp9446TSdwiJwrkdcUyKtcqtdZw8donGapot1+a1cVA9ilep2Wflz4aiU/Pw j6dYPnMo6LW9VxvETT9GJuEElGfUTsyGN+zpoRjtbg9ABwpto8= 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.