Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Bug in regexp operator when warn_create_global is in effect

On Mon, 06 Feb 2017 11:44:09 +0100
Ronald Fischer <ynnor@xxxxx> wrote:
> > Yes, you're right, the user doesn't even necessarily want them, which is
> > different from the case of the globbing flags in native zsh
> > expressions.  So probably best to turn the warnings off.
> I wouldn't consider this an optimal solution. This type of warning
> proved to be extremely useful, and was catching already several spelling
> errors in our own program.

I'm not sure what you're referring to, but the change only turns off the
warnings for the case in question, i.e. regular expression matches,
where the use of the variables is hidden, the one you were complaining
about.  You were talking about creating the relevant variables even if
they were never used, but simply not warning when they are created by
the syntax in question should be equivalent and less invasive, I think.
(Those are "the warnings" I was talking about:  I wasn't explicit, which
may have caused confusion.)

Furthermore, creating MATCH etc. would suppress warnings in other cases
where zsh-specific syntax is used to request they be created, in
particular the globbing flag (#m), and from the above you appear to be
suggesting other cases should (ideally) not be suppressed.

If you're talking about other cases, if you could show exactly what's
triggering a warning, or failing to trigger it, I'll have a look.


Messages sorted by: Reverse Date, Date, Thread, Author