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

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



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.

The suggested wording (for both) is something like

"by default metacharacters, used in globbing, are quoted in result of
parameter expansion. This option (flag) prevent this quoting, enabling the
result of parameter expansion to be interpreted as pattern in subsequent
filename expansion or pattern matching in builtin condition, case etc."
Probably, some examples (like the above) would also be nice.

BTW is -M flag to completion affected by GLOB_SUBST?

/andrej




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