From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11542 invoked by alias); 2 Jun 2010 11:56:55 -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: 27990 Received: (qmail 12881 invoked from network); 2 Jun 2010 11:56:53 -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=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS autolearn=ham version=3.3.1 Received-SPF: none (ns1.primenet.com.au: domain at csr.com does not designate permitted sender hosts) Date: Wed, 2 Jun 2010 12:19:01 +0100 From: Peter Stephenson To: Martin Buchholz , zsh-workers@zsh.org Cc: Joel Ebel Subject: Re: zsh ignores the arguments on its first command. Message-ID: <20100602121901.6ce71329@csr.com> In-Reply-To: References: <201006012145.o51LjhGg005724@pws-pc.ntlworld.com> Organization: Cambridge Silicon Radio X-Mailer: Claws Mail 3.7.5 (GTK+ 2.18.9; i686-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 02 Jun 2010 11:19:01.0558 (UTC) FILETIME=[67146560:01CB0245] X-Scanned-By: MailControl A_09_40_00 (www.mailcontrol.com) on 10.71.1.133 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. Setting up the terminal should be handled dynamically when the TERM variable changes (which is a completely sepearate issue). Index: Src/Modules/terminfo.c =================================================================== 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 13 Mar 2008 11:11:05 -0000 1.34 +++ Src/Modules/terminfo.c 2 Jun 2010 11:17:51 -0000 @@ -341,8 +341,12 @@ boot_(Module m) # ifdef HAVE_SETUPTERM int errret; - if (setupterm((char *)0, 1, &errret) == ERR) - return 1; + /* + * Just because we can't set up the terminal doesn't + * mean the modules hasn't booted---TERM may change, + * and it should be handled dynamically---so ignore errors here. + */ + (void)setupterm((char *)0, 1, &errret); # endif #endif -- Peter Stephenson Software Engineer Tel: +44 (0)1223 692070 Cambridge Silicon 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 and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom