From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4013 invoked from network); 27 Mar 2001 19:18:44 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 27 Mar 2001 19:18:44 -0000 Received: (qmail 27446 invoked by alias); 27 Mar 2001 19:18:38 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 13801 Received: (qmail 27434 invoked from network); 27 Mar 2001 19:18:37 -0000 From: "Bart Schaefer" Message-Id: <1010327191817.ZM14338@candle.brasslantern.com> Date: Tue, 27 Mar 2001 19:18:16 +0000 In-Reply-To: Comments: In reply to Zefram "Re: "setopt noexec" and interactive shells" (Mar 27, 7:09pm) References: X-Mailer: Z-Mail (5.0.0 30July97) To: zsh-workers@sunsite.dk Subject: Re: "setopt noexec" and interactive shells MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Mar 27, 7:09pm, Zefram wrote: } Subject: Re: "setopt noexec" and interactive shells } } Bart Schaefer wrote: } >There's no way to make the option un-, or rather re-, settable because } >once you're not executing commands the state of the shell is effectively } >frozen. } } By "unsettable" I meant that the shell does not permit one to change } the state of the option. Aha. But, unlike `interactive', there's no reason not to allow `noexec' to become set in a shell function, provided that it's going to be restored again by `localoptions' when the function exits. That was why my original (some weeks ago) patch reset the option just before the prompt was printed, rather than disabling it at some lower level. } I'm basically happy with your patch (or the revised version) in } that it retains the state of NO_EXEC and simply denies it effect, } the way ksh does. } } As I suggested above, I'd prefer that that condition be } } if (unset(EXECOPT) && unset(INTERACTIVE)) That's fine with me, too, but I'd still like to hear any thoughts you have on making `noexec' work within a shell function. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net