From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23502 invoked by alias); 2 Jun 2010 16:44:27 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 27991 Received: (qmail 14474 invoked from network); 2 Jun 2010 16:44:25 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_MED,SPF_HELO_PASS autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 216.239.44.51 as permitted sender) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1275497059; bh=dbZcq1FvTHZZotwGzt1/v370T6o=; h=MIME-Version:In-Reply-To:References:Date:Message-ID:Subject:From: To:Cc:Content-Type:Content-Transfer-Encoding; b=NipxPIFXO5zbER83BHgv7ZX5B1/LwNrPz2l++E9hYokmYHvivsMm2VEswbW565mjd +NdMNdJd7qIz7BJcuK/yw== DomainKey-Signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns; h=mime-version:in-reply-to:references:date:message-id:subject:from:to: cc:content-type:content-transfer-encoding:x-system-of-record; b=SIc3GePZ61SGDr9Xud7wx0MX9UPsgscbt5iTFbks25U4k5iKyFN/sUbQyQfhMizlV QNCmVMeg7mn4NShaFb39A== MIME-Version: 1.0 In-Reply-To: <20100602121901.6ce71329@csr.com> References: <201006012145.o51LjhGg005724@pws-pc.ntlworld.com> <20100602121901.6ce71329@csr.com> Date: Wed, 2 Jun 2010 09:44:13 -0700 Message-ID: Subject: Re: zsh ignores the arguments on its first command. From: Martin Buchholz To: Peter Stephenson Cc: zsh-workers@zsh.org, Joel Ebel Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-System-Of-Record: true Peter, Thanks for the fix. I was thinking that, in addition, the construct ${+NAME} should never cause "unknown parameter", not even due to failure to load a module that provides the parameter as a feature, so an additional fix in the zsh core might be good. If a module fails to load, NAME should become an ordinary unset variable, and ${+NAME} should be 0. Martin On Wed, Jun 2, 2010 at 04:19, Peter Stephenson w= rote: > On Wed, 2 Jun 2010 00:05:20 -0700 > Martin Buchholz wrote: >> Alright, let's try again to report the bug with the terminfo special >> parameter and the zsh/terminfo module: >> >> $ (unset TERM; zsh -fic 'echo $ZSH_VERSION; echo ${+terminfo}') >> 4.3.10 >> zsh:1: unknown parameter: terminfo > > Ah, thanks, unsetting TERM was the key. > > I think we're being over eager in reporting that the terminfo module didn= 't > load because the terminal wasn't set up. =A0Setting up the terminal shoul= d be > handled dynamically when the TERM variable changes (which is a completely > sepearate issue). > > Index: Src/Modules/terminfo.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > RCS file: /cvsroot/zsh/zsh/Src/Modules/terminfo.c,v > retrieving revision 1.34 > diff -p -u -r1.34 terminfo.c > --- Src/Modules/terminfo.c =A0 =A0 =A013 Mar 2008 11:11:05 -0000 =A0 =A0 = =A01.34 > +++ Src/Modules/terminfo.c =A0 =A0 =A02 Jun 2010 11:17:51 -0000 > @@ -341,8 +341,12 @@ boot_(Module m) > =A0# ifdef HAVE_SETUPTERM > =A0 =A0 int errret; > > - =A0 =A0if (setupterm((char *)0, 1, &errret) =3D=3D ERR) > - =A0 =A0 =A0 return 1; > + =A0 =A0/* > + =A0 =A0 * Just because we can't set up the terminal doesn't > + =A0 =A0 * mean the modules hasn't booted---TERM may change, > + =A0 =A0 * and it should be handled dynamically---so ignore errors here. > + =A0 =A0 */ > + =A0 =A0(void)setupterm((char *)0, 1, &errret); > =A0# endif > =A0#endif > > -- > Peter Stephenson =A0 =A0 =A0 =A0 =A0 =A0Software Engineer > Tel: +44 (0)1223 692070 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 Cambridge Sil= icon Radio Limited > Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ= , UK > > > Member of the CSR plc group of companies. CSR plc registered in England a= nd Wales, registered number 4187346, registered office Churchill House, Cam= bridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom >