From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4087 invoked from network); 27 Mar 2001 19:25:45 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 27 Mar 2001 19:25:45 -0000 Received: (qmail 29079 invoked by alias); 27 Mar 2001 19:25:37 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 13802 Received: (qmail 29067 invoked from network); 27 Mar 2001 19:25:36 -0000 Subject: Re: "setopt noexec" and interactive shells In-Reply-To: <1010327191817.ZM14338@candle.brasslantern.com> from Bart Schaefer at "Mar 27, 2001 07:18:16 pm" To: Bart Schaefer Date: Tue, 27 Mar 2001 20:25:35 +0100 (BST) CC: zsh-workers@sunsite.dk X-Mailer: ELM [version 2.4ME+ PL66 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-Id: From: Zefram Bart Schaefer wrote: >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. *grumble*. What's anyone ever going to use noexec for other than syntax checking? I'd prefer that we give the option a consistent behaviour. For the record, pdksh makes no such distinction between commands in a function and commands at the top level: $ foo () { echo foo $-; set -n; echo bar $-; } $ echo foo $- foo ims $ foo foo ims bar imns $ echo bar $- bar imns -zefram