#598236 posh: variable assignments do not affect the env when calling a function

Package:
posh
Source:
posh
Description:
Policy-compliant Ordinary SHell
Submitter:
Michał Górny
Date:
2011-08-30 10:06:50 UTC
Severity:
normal
#598236#5
Date:
2010-09-27 17:53:46 UTC
From:
To:
Hello,

Consider the following test code:

#v+
func() { :; }
A=test func
echo $A
#v-

Running that code in strict POSIX mode of bash or dash results in
'test' output. However, running in posh it doesn't output anything.

Trying to explain that behavior, I run into bug #485463 which seems to
be the reason of it. The reasoning assumed for that patch is
unfortunately not true.

Quite a good explanation can be found on bug-bash:
http://lists.gnu.org/archive/html/bug-bash/2010-08/msg00164.html

Thus, I think that the particular change done due to bug #485463 should
be reverted and the original behavior should be restored as the one
being POSIX compliant.

#598236#10
Date:
2010-09-27 19:26:26 UTC
From:
To:
Thoughts, Stephane?
#598236#15
Date:
2011-08-30 09:59:18 UTC
From:
To:
Ping. This is still a case in 0.10.