2014-12-09 07:14:16 -0700, Eric Blake: [...] > No, you get the correct behavior. Newer bash fixed the parser bug to > comply with POSIX. > > For comparison, try: > > $ echo . ${VAR:=""} . > . . > $ echo . "${VAR:=""}" . > . . [...]
It's a bit confusing that ${VAR:-""} should be treated differently from ${VAR:=""}. Was there a rationale for changing the behaviour other than strict POSIX conformance? AFAICT, ksh and mksh behave differently (from bash and from each other), so I can't say the change helps much with portability here. -- Stephane