Date:        Fri, 3 Nov 2017 08:21:41 -0400
    From:        Greg Wooledge <wool...@eeg.ccf.org>
    Message-ID:  <20171103122141.tvbmv5sfkcs7h...@eeg.ccf.org>

  | I am not seeing any evidence of this.

As I said, for that particular usage, the effect is the same, either way.
The way the shell gets there differs, but the result happens not to.

To see some difference, run

        for i in ${x-"a ${x-"b c"}" d}; do echo "z${i}z"; done

If you get (when x is unset of course)

        za bz
        zcz
        zdz

then the shell is doing it the (current) posix way.   Bash (and several
other shells) produce (because the 'b c' is being treated as quoted, when
it should not be with current posix rules - until the change is published
and it becomes unspecified.)

        za b cz
        zdz

and it is all because of the "what gets quoted, and where" issue (in many
examples, the "assign and then expand" behaviour often masks the differences,
so the '=' operator isn't the best way to see it.)

kre


Reply via email to