Robert Elz <[email protected]> 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.

> Aside from that, are there really any current shells that don't discard empty
> fields from $@ or $* (it obviously can't happen if those are quoted) ?  I
> suppose the tricky case would be ""$@ (or $*"" or similar).

We worked on the 2.5.2 wording relatively recently (TC2) and put the "may"
there because we found that some shells discard the empty fields and some
keep them.  I don't recall which shells keep them.

-- 
Geoff Clare <[email protected]>
The Open Group, Apex Plaza, Forbury Road, Reading, RG1 1AX, England

Reply via email to