-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 5/5/14, 5:27 PM, Arfrever Frehtes Taifersar Arahesis wrote: > 2014-05-05 22:12 Chet Ramey napisa?(a): >>> Ability to locally unset a variable also for subprocesses would be >>> preferable solution. >> >> OK. I'm not sure exactly what this means. Can you give me an example? >> How would you use this in a situation where `unset' or `declare +x' are >> unusable? > > I would like to be able to unexport a variable for subprocesses called in > given function, but > not subprocesses called later outside of given function.
OK. I believe that the bash-4.2 behavior was a bug (and it was, it caused several reported seg faults with null pointer dereferences and the aforementioned inconsistent behavior). What you want is fundamentally at odds with how the shell is intended to behave. Is it enough to assign empty values to the local variables? Chet - -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, ITS, CWRU c...@case.edu http://cnswww.cns.cwru.edu/~chet/ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (Darwin) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlNo9hEACgkQu1hp8GTqdKurTgCeLal2lsToqnko8d653O5Vj+H4 utwAn3eiZdPS5onqMZYRZeyBuf/ABsF2 =IpH6 -----END PGP SIGNATURE-----