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

Re: compctl -g not working

Bart Schaefer wrote:
>Should we make BARE_GLOB_QUAL a bit smarter so that it knows about
>KSH_GLOB and looks back one more character to see if what precedes the
>open-paren token is one of the ksh-glob-chars?

Is "*(.)" a pattern "*" followed by glob qualifiers, or a ksh-style
pattern?  With the current system it's easy to predict when part
of a pattern will be interpreted as glob qualifiers, so you know to
disambiguate it if you didn't intend it to be taken as qualifiers.
With your proposed change, you'd have to think about the opposite
ambiguity too -- a set of glob qualifiers might be interpreted as part of
a pattern, and you'd sometimes need extra effort to force interpretation
as glob qualifiers.  I recommend sticking with the current, simpler, rule.

This is why we made the BARE_GLOB_QUAL option -- we wanted an unambiguous
syntax for glob qualifiers, that wouldn't get in the way of globbing
syntax at all.  Unfortunately no one's yet come up with a really good


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