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

Re: Incomplete/misleading description of GLOB_SUBST and $~ paramter expansion flag



Andrej Borsenkow wrote:

> This resulted from this line of Sven's:
> 
> if [[ "$cmd1" == $~pat || "$cmd2" == $~pat ]] then
> 
> (again something, I didn't know before and that is hard to infer from
> manuals :-(
> 
> The current description of above items imply, that they affect only file
> name expansion (globbing). The reality is, they prevent globbing
> metacharacters from being quoted in _any_ context where glob pattern is
> used. This includes, but is not limited to, filename expansion.

Agreed, we should document this.

> BTW is -M flag to completion affected by GLOB_SUBST?

No. Completion uses it's own matching code. Once I was dreaming of
using the existing globbing code, but since completion needs a lot of
information that is hard to get out of the globbing code (or
impossible without a lot of hacking), I had to write specialised
functions.

Bye
 Sven


--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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