From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1852 invoked from network); 14 Mar 2008 19:58:00 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.4 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 14 Mar 2008 19:58:00 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 55136 invoked from network); 14 Mar 2008 19:57:54 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 14 Mar 2008 19:57:54 -0000 Received: (qmail 16768 invoked by alias); 14 Mar 2008 19:57:51 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 24714 Received: (qmail 16752 invoked from network); 14 Mar 2008 19:57:50 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 14 Mar 2008 19:57:50 -0000 Received: from mtaout01-winn.ispmail.ntl.com (mtaout01-winn.ispmail.ntl.com [81.103.221.47]) by bifrost.dotsrc.org (Postfix) with ESMTP id 5165780307F7 for ; Fri, 14 Mar 2008 20:57:47 +0100 (CET) Received: from aamtaout02-winn.ispmail.ntl.com ([81.103.221.35]) by mtaout01-winn.ispmail.ntl.com with ESMTP id <20080314200009.JHYT16169.mtaout01-winn.ispmail.ntl.com@aamtaout02-winn.ispmail.ntl.com> for ; Fri, 14 Mar 2008 20:00:09 +0000 Received: from pws-pc ([81.107.42.63]) by aamtaout02-winn.ispmail.ntl.com with ESMTP id <20080314195932.NYSU17393.aamtaout02-winn.ispmail.ntl.com@pws-pc> for ; Fri, 14 Mar 2008 19:59:32 +0000 Date: Fri, 14 Mar 2008 19:57:27 +0000 From: Peter Stephenson To: zsh workers Subject: Re: zkbd fails: must be run as a function or shell script, not sourced Message-ID: <20080314195727.50800daa@pws-pc> In-Reply-To: <080313162818.ZM21832@torch.brasslantern.com> References: <20080313202748.GV30518@fsst.voodoo.lan> <080313162818.ZM21832@torch.brasslantern.com> X-Mailer: Claws Mail 3.3.1 (GTK+ 2.12.5; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.91.2/6234/Fri Mar 14 19:12:40 2008 on bifrost X-Virus-Status: Clean On Thu, 13 Mar 2008 16:28:18 -0700 Bart Schaefer wrote: > If you remove the "2>/dev/null" you get the error message: > > zkbd:5: read-only variable: ARGC > >... > So although I say "lost PM_HIDE", in point of fact I don't know how it > had PM_HIDE in the first place. It didn't. I think the relevant change is this: @@ -2033,6 +2033,10 @@ * because we've checked for unpleasant surprises above. */ pm->node.flags = (PM_TYPE(pm->node.flags) | on | PM_SPECIAL) & ~off; + /* + * Readonlyness of special parameters must be preserved. + */ + pm->node.flags |= tpm->node.flags & PM_READONLY; if (newspecial == NS_SECONDS) { /* We save off the raw internal value of the SECONDS var */ tpm->u.dval = getrawseconds(); So what was happening before was that ARGC wasn't being hidden, it was staying special but was incorrectly being marked as not readonly, which doesn't make sense since the special meaning is by definition a readonly one (and goodness knows what effect changing it had). It seems to me therefore that adding the "-h" in zkbd is the pukka thing to do. -- Peter Stephenson Web page now at http://homepage.ntlworld.com/p.w.stephenson/