tech-userlevel archive

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

Re: bin/47597: local and $() don't play well with each other



On Tue, Feb 26, 2013 at 09:00:18PM +0100, Steffen Nurpmeso wrote:
> 
> [1] http://thread.gmane.org/gmane.comp.standards.posix.austin.general/6728

Thanks for the tip! This one thread in fact tells what this thread has
told: diverging interpretations. So, at least, the standard is unclear
(but my feeling is that the assignment persistence was for the special
builtin "export"---makes some sense...---, extended to all the
other special builtins, and if a shell function, masquerading as an
utility (with parameters etc.), behaves differently from an external
utility, except if it is a POSIX.2 utility meaning that shell
implementations, of wrappers writers will have to treat specifically the
thing this is stupid...).

Not to mention that if one wants to make the assignment persistent:

foo=XXX
f

or:

foo=XXX; f

does the trick so I fail to see a justification for this behavior...
-- 
        Thierry Laronde <tlaronde +AT+ polynum +dot+ com>
                      http://www.kergis.com/
Key fingerprint = 0FF7 E906 FBAF FE95 FD89  250D 52B1 AE95 6006 F40C


Home | Main Index | Thread Index | Old Index