Date:        Sun, 31 May 2026 16:32:33 +0200
    From:        Andreas Schwab <[email protected]>
    Message-ID:  <[email protected]>

  | Because '\*' is not a glob, so filename expansion is not performed.

It is only "not a glob" because the \ is escaping the * ... it really
can't be (or shouldn't be) two things at once, either it is an escape,
the * isn't a glob pattern, and the word is effectively '*', and no
filename expansion happens, or it isn't an escape, in which case the *
is a pattern char, the word then is a glob, filename expansion happens,
and the \ before the * protects the * from expansion, just as it does when
the word was \**

The best thing to do when deciding if a word needs filename expansion or
not, is to simply ignore any \ in the word, if it contains what look like
pattern chars (? * [) then apply filename expansion, if some of what were
thought initially to be pattern chars turn out not to be, then that's OK
(and having acted as an escape, if that is what happened, a \ will vanish).

kre



Reply via email to