bug-bash
[Top][All Lists]
Advanced

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

Re: $IGNOREEOF always modified by `local -'


From: Chet Ramey
Subject: Re: $IGNOREEOF always modified by `local -'
Date: Mon, 27 Jul 2020 12:09:19 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

On 7/24/20 2:25 AM, Grisha Levit wrote:
> Having IGNOREEOF defined prior to invoking a function that uses `local -'
> causes IGNOREEOF to be set to `10' after the function returns.
> 
>     $ IGNOREEOF=0; f() { local -; }; f; echo $IGNOREEOF
>     10

Yes, that's the default. `local -' saves the state of the option, not the
value of those options backed by variables (which just doesn't scale well).

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]