Chet Ramey <chet.ra...@case.edu> wrote, on 24 Jun 2019: > > On 6/24/19 11:51 AM, Stephane Chazelas wrote: > > 2019-06-24 09:48:21 -0400, Chet Ramey: > >> On 6/22/19 2:51 AM, Stephane Chazelas wrote: > >> > >>> For them, and me, and it seems Eric as well, globbing is an > >>> operator that is invoked whenever a word contains an unquoted > >>> wildcard character (in "list" contexts). > >> > >> If you want the standard to say that, then propose language to make the > >> standard say it. It doesn't say that now, and that's the root of this > >> entire discussion. At this point, we're just talking in circles. > > [...] > > > > Before going in the details of the language, can we at least > > agree on what the "intention" should be? > > Your intention is obvious. It's in the part I quoted. > > Pathname expansion is performed on words that contain an unquoted > `*', `?', or valid unquoted bracket expression.
There is a complication involving invalid bracket expressions. The standard currently says: If the pattern contains an open bracket ('[') that does not introduce a bracket expression as in XBD Section 9.3.5, it is unspecified whether other unquoted pattern matching characters within the same slash-delimited component of the pattern retain their special meanings or are treated as ordinary characters. For example, the pattern "a*[/b*" may match all filenames beginning with 'b' in the directory "a*[" or it may match all filenames beginning with 'b' in all directories with names beginning with 'a' and ending with '['. So if the intention is that pathname expansion is only performed for patterns that contain some characters that will be treated as special, then on implementations which take the "treated as ordinary characters" option, any special characters that are treated as ordinary because of this should not trigger pathname expansion. -- Geoff Clare <g.cl...@opengroup.org> The Open Group, Apex Plaza, Forbury Road, Reading, RG1 1AX, England