From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13910 invoked by alias); 11 Dec 2015 13:50:57 -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: X-Seq: 37386 Received: (qmail 1195 invoked from network); 11 Dec 2015 13:50:55 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.0 X-AuditID: cbfec7f5-f79b16d000005389-f8-566ad4ba7fb8 Date: Fri, 11 Dec 2015 13:50:47 +0000 From: Peter Stephenson To: zsh-workers@zsh.org Subject: Re: WARN_CREATE_GLOBAL and url-quote-magic Message-id: <20151211135047.7b1c9847@pwslap01u.europe.root.pri> In-reply-to: <20151211130507.GA14502@cventin.lip.ens-lyon.fr> References: <20151211130507.GA14502@cventin.lip.ens-lyon.fr> Organization: Samsung Cambridge Solution Centre X-Mailer: Claws Mail 3.7.9 (GTK+ 2.22.0; i386-redhat-linux-gnu) MIME-version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrALMWRmVeSWpSXmKPExsVy+t/xq7q7rmSFGax5qGdxsPkhkwOjx6qD H5gCGKO4bFJSczLLUov07RK4Mr5MPste8JSrYv+3uSwNjA84uhg5OSQETCSez3nKAmGLSVy4 t54NxBYSWMoocf9hbhcjF5A9g0ni2LdnTBDOOUaJ13P3s0M4ZxkljvyYzgjSwiKgKrFt3VSw djYBQ4mpm2aDxUUExCXOrj0PtkJYwFji6dGr7CA2r4C9xMXJs8FsTgFbiU27zzNDrLaR6H77 AizOL6AvcfXvJyaI8+wlZl45wwjRKyjxY/I9sJnMAloSm7c1sULY8hKb17yFmqMucePubvYJ jMKzkLTMQtIyC0nLAkbmVYyiqaXJBcVJ6blGesWJucWleel6yfm5mxgh4fx1B+PSY1aHGAU4 GJV4eBdwZIUJsSaWFVfmHmKU4GBWEuH9tQEoxJuSWFmVWpQfX1Sak1p8iFGag0VJnHfmrvch QgLpiSWp2ampBalFMFkmDk6pBkbDQ8ws2W9mlTn+73wuH+PQJqzIsDRgb+HvWdYREkK2rgvD dBfw2J/XD1lk/SzjtPineR0eYjHfq20/KucFnOdUOzupfd2P+k/9rXxv9+WmW8ZcnMm69/Ve xf9rj9w956J6gemj6IzUuTNV8x9Jv2aYF2T3vZmzXmBlttjsTpc3NW2BNd6PXZRYijMSDbWY i4oTARE/ioxjAgAA On Fri, 11 Dec 2015 14:05:07 +0100 Vincent Lefevre wrote: > I don't think that the following has been reported yet. Run "zsh -f" > and: > > setopt WARN_CREATE_GLOBAL > autoload -Uz url-quote-magic > zle -N self-insert url-quote-magic > > Then type "echo a:b ". After typing the space after "a:b", I get: > > cventin% echo a:b > url-quote-magic:12: array parameter match created globally in function url-quote-magic > url-quote-magic:12: array parameter mbegin created globally in function url-quote-magic > url-quote-magic:12: array parameter mend created globally in function url-quote-magic > cventin% echo a:b Yes, it's the (#b) in the pattern creating those parameters. All such instances in distributed functions should be suitably protected. I don't think there's any chance of needing the result in a higher scope this time... pws diff --git a/Functions/Zle/url-quote-magic b/Functions/Zle/url-quote-magic index 0e49573..7ee281e 100644 --- a/Functions/Zle/url-quote-magic +++ b/Functions/Zle/url-quote-magic @@ -115,7 +115,7 @@ alias globurl='noglob urlglobber ' function url-quote-magic { setopt localoptions noksharrays extendedglob local qkey="${(q)KEYS}" - local -a reply + local -a reply match mbegin mend if [[ "$KEYS" != "$qkey" ]] then local lbuf="$LBUFFER$qkey"