On 3/20/17 2:30 PM, Eric Blake wrote: > On 03/17/2017 07:21 PM, Stephane Chazelas wrote: > >>> The problem is the non-obvious nature of unset's interaction with scope, >> >> the main problem to me is an unset command that doesn't unset. >> >> As shown in my original post, there's also a POSIX conformance >> issue. > > As POSIX has not yet specified 'local', any use of 'local' already > renders the script non-conformant, so it shouldn't matter what bash does > in that situation (although if POSIX is ever going to standardize > 'local', it requires some concerted effort to make all shells with > 'local' to settle on a lowest common denominator).
I believe he means the behavior of `a=0; a=1 eval unset a', which Posix implicitly requires affect the global scope and results in a being unset when the statement completes. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU c...@case.edu http://cnswww.cns.cwru.edu/~chet/
signature.asc
Description: OpenPGP digital signature