Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Localize MATCH, MBEGIN, etc. in _zstyle and _globquals
- X-seq: zsh-workers 41975
- From: Sebastian Gniazdowski <psprint@xxxxxxxxxxx>
- To: Phil Pennock <zsh-workers+phil.pennock@xxxxxxxxxxxx>
- Subject: Re: Localize MATCH, MBEGIN, etc. in _zstyle and _globquals
- Date: Thu, 2 Nov 2017 20:09:15 +0100
- Cc: zsh-workers@xxxxxxx
- In-reply-to: <etPan.59f655ed.1f659851.98a8@AirmailxGenerated.am>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <etPan.59f5be1b.1dad7c90.98a8@zdharma.org> <etPan.59f655ed.1f659851.98a8@AirmailxGenerated.am>
On 29 Oct 2017 at 23:07:21, Phil Pennock (zsh-workers+phil.pennock@xxxxxxxxxxxx) 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author