Stephane Chazelas <stephane.chaze...@gmail.com> wrote, on 17 Jun 2019:
>
> 2019-06-17 12:14:29 +0100, Geoff Clare:
> [...]
> > The standard clearly requires pathname expansion to be performed,
> > using the pattern \*x
> > 
> > If some shells don't bother to actually read the directory and do
> > any matching operations, depending on the pattern contents, because
> > they know that the outcome will be the same regardless of the contents
> > of the directory, then that's an acceptable internal optimisation, but
> > it doesn't affect what the standard requires the outcome of pathname
> > expansion to be.
> [...]
> 
> So you're saying bash5 is the only compliant implementation
> here, right?

As far as the examples below are concerned, yes.

> That:
> 
> touch '*x'
> file='\*x' IFS=
> printf %s $file
> 
> MUST output "*x" as *x is a file (the file) that matches the \*x
> pattern.

Yes.

> And:
> 
> BEL='\a' IFS=
> printf %b $BEL
> 
> MUST output "a" if there's a file called "a" in the current
> directory because that "a" file matches the "\a" pattern.

Yes.

> And all other implementations (including all the certified ones,
> including kre's) should be deemed non-compliant?

Yes.

-- 
Geoff Clare <g.cl...@opengroup.org>
The Open Group, Apex Plaza, Forbury Road, Reading, RG1 1AX, England

Reply via email to