Date:        Sun, 19 Jul 2020 15:21:07 -0400
    From:        Chet Ramey <chet.ra...@case.edu>
    Message-ID:  <5f066ef0-1fed-ad5b-d564-490268d32...@case.edu>

  | Maybe, but Posix says this isn't a variable assignment context, as POSIX
  | defines variable assignments, and technically  the shell shouldn't perform
  | tilde expansions after `=' or `:' at all. You could argue that bash has a
  | bug here in that it expands the tilde after the `='.

It may also be that this is a bug in POSIX, as all ksh shells seem to
act the way that bash does, expanding the first ~ but not the secpod.
Most other shells expand neither, except the NetBSD shell which treats
this as a var assignment (which it is really, however explained away in
POSIX) and expands both.

It is likely that if someone were to file a posix bug report about this,
it would turn into "unspecified" whether ~ expansion is done in that context.

kre


Reply via email to