Geoff Clare <g...@opengroup.org> wrote, on 07 Aug 2018:
>
> Robert Elz <k...@munnari.oz.au> wrote, on 06 Aug 2018:
> >
> >   | For step 1 this would conflict with 2.5.2 which says that empty fields
> >   | resulting from expanding @ and * _may_ be discarded.  Your suggestion
> >   | would require them to be discarded instead of it being optional.
> > 
> > Is that any different from what it currently says...
> > 
> >     If the complete expansion appropriate for a word results in an empty 
> > field,
> >     that empty field shall be deleted from the list of fields that form the 
> > completely
> >     expanded command, unless the ...
> > 
> > (where the "unless the..." part is what really needs fixing  - and I was 
> > just 
> > looking for the best way to accomplish that)..
> 
> Good point.  So this is a problem that already existed - but it still
> needs fixing.

After further thought, that existing paragraph doesn't just conflict
with 2.5.2, it's simply wrong.  Empty fields resulting from the complete
expansion are not deleted:

$ sh -c 'IFS=:; var="a::b"; printf "[%s]\n" $var'
[a]
[]
[b]

The paragraph should be deleted.

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

Reply via email to