bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [BUG] With null IFS, ${1+$*}, ${var-$*}, etc. don't generate fields


From: Martijn Dekker
Subject: Re: [BUG] With null IFS, ${1+$*}, ${var-$*}, etc. don't generate fields
Date: Sat, 18 Mar 2017 14:40:55 +0100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.7.1

Op 27-02-17 om 21:03 schreef Chet Ramey:
> If you think you have a winning argument, initiate a new discussion with
> the Austin Group.  You might want to dig up the mail archives from
> October, 2014 and look at the discussion that preceded interpretation 888.

Thanks for the heads-up. I'm finding some time to do that now.

> You might also prepare a counter to the argument that at the time the
> $* on the right side of the parameter expansion is expanded, the rules
> in force are detailed in 2.6.2 ("word shall be subjected to tilde
> expansion, parameter expansion, command substitution, and arithmetic
> expansion"), and word splitting isn't listed. I think that came up before.

I've got three counterpoints to that:

1. This is irrelevant, because the bug does not concern splitting
fields, but instead failure to generate fields as specified.

2. Even if it were relevant, in the case under discussion, IFS is null,
so field splitting is a no-op anyway.

3. In the general case, field splitting not being listed there simply
means that field splitting is not performed for the word on the right
side /within/ an expansion such as ${var-$*} (in this case, that word
being $*). If the ${var-$*} expansion as a whole is not quoted, then
field splitting is performed as normal for the expansion as a whole (as
is pathname expansion/globbing), as detailed in 2.6.

- M.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]