From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4914 invoked by alias); 29 Oct 2017 22:24:42 -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: 41962 Received: (qmail 20988 invoked by uid 1010); 29 Oct 2017 22:24:42 -0000 X-Qmail-Scanner-Diagnostics: from mx.spodhuis.org 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(94.142.241.89):SA:0(-4.2/5.0):. Processed in 2.175542 secs); 29 Oct 2017 22:24:42 -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=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: zsh-workers+phil.pennock@spodhuis.org X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=spodhuis.org; s=d201708; h=In-Reply-To:Content-Transfer-Encoding: Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Sender:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=sWP7CQ8kx7R5YsqwK+b+rHixJdxUEdXFL1cjYZBVo4g=; b=FCXytLKKDbF9ym6nlnZdkabfBp 8LyvRW27KMgf9hF4oUchHCgJNXSxtEbyKD3sQkwEXj78n+2QTiWm3b9S+mVyV147H+Qq+mrUTxh7V DMVD9RWcPp/m7/diw9pN7gz7tTSvJUkB9UCYngBk/Oi6A42voAw+fUkTnTVajuuy8Nb8SmfZGYDE1 b2zpAG1Q9xsOLOAm5Z4wHK3ENXmU; Date: Sun, 29 Oct 2017 18:07:21 -0400 From: Phil Pennock To: Sebastian Gniazdowski Cc: zsh-workers@zsh.org Subject: Re: Localize MATCH, MBEGIN, etc. in _zstyle and _globquals Message-ID: <20171029220721.GA37711@tower.spodhuis.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: OpenPGP: url=https://www.security.spodhuis.org/PGP/keys/0x4D1E900E14C1CC04.asc On 2017-10-29 at 12:40 +0100, Sebastian Gniazdowski wrote: > I was searching for regex usage (=~) and didn't find anything > meaningful (would replace with (#b) or (#m) so that e.g. default > static build works fine). However found (#m) use and not defined local > MATCH, MBEGIN, MEND. To not surprise user with overwriting his > matching results, I've localized those parameters in two Zsh-related > completions. _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. 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? -Phil