Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: zsh ignores the arguments on its first command.
- X-seq: zsh-workers 27990
- From: Peter Stephenson <Peter.Stephenson@xxxxxxx>
- To: Martin Buchholz <martinrb@xxxxxxxxxx>, zsh-workers@xxxxxxx
- Subject: Re: zsh ignores the arguments on its first command.
- Date: Wed, 2 Jun 2010 12:19:01 +0100
- Cc: Joel Ebel <jbebel@xxxxxxxxxx>
- In-reply-to: <AANLkTikvkgA0bFLLh7VLVtBbUVMdM64-2iQXjAVbHvaA@xxxxxxxxxxxxxx>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- Organization: Cambridge Silicon Radio
- References: <martinrb@xxxxxxxxxx> <AANLkTikiCBKGaJcuE9s-vMZvK465tTR6WSFIsy6wo7xL@xxxxxxxxxxxxxx> <201006012145.o51LjhGg005724@xxxxxxxxxxxxxxxxxxx> <AANLkTikvkgA0bFLLh7VLVtBbUVMdM64-2iQXjAVbHvaA@xxxxxxxxxxxxxx>
On Wed, 2 Jun 2010 00:05:20 -0700
Martin Buchholz <martinrb@xxxxxxxxxx> 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 <pws@xxxxxxx> 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author