From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22612 invoked by alias); 2 Nov 2017 19:09:27 -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: 41975 Received: (qmail 24707 invoked by uid 1010); 2 Nov 2017 19:09:26 -0000 X-Qmail-Scanner-Diagnostics: from aok120.rev.netart.pl 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(85.128.245.120):SA:0(-1.9/5.0):. Processed in 3.324452 secs); 02 Nov 2017 19:09:26 -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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: psprint@zdharma.org X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | X-Virus-Scanned: by amavisd-new using ClamAV (10) Date: Thu, 2 Nov 2017 20:09:15 +0100 From: Sebastian Gniazdowski To: Phil Pennock Cc: zsh-workers@zsh.org Message-ID: In-Reply-To: References: Subject: Re: Localize MATCH, MBEGIN, etc. in _zstyle and _globquals X-Mailer: Airmail (442) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline On 29 Oct 2017 at 23:07:21, Phil Pennock (zsh-workers+phil.pennock@spodhuis.org) wrote: > _main_complete localizes `match` already. So if we don't localize all > of them in the same place then we're risking inconsistency, no matter > what. Worth noting it doesn't localize $mbegin and $mend. Also, it uses local not local -a for $match, which is a minor thing. > Anyone know of a good reason to not just localize _all_ of the =~ > non-BASH_REMATCH variables in _main_complete so that they're always > isolated to the completion-system, if =~ or -regex-match or -pcre-match > is used within the completion system? I'm little not current with regex match variables, so not sure what you mean by "=~" variables, and why not localize non-BASH_REMATCH variables too (or if it's that Zsh code doesn't use them, then it's ok for me, logical to not localize them). -- Sebastian Gniazdowski psprint /at/ zdharma.org