zsh-workers
 help / color / mirror / code / Atom feed
From: Martin Buchholz <martinrb@google.com>
To: Peter Stephenson <Peter.Stephenson@csr.com>
Cc: zsh-workers@zsh.org, Joel Ebel <jbebel@google.com>
Subject: Re: zsh ignores the arguments on its first command.
Date: Wed, 2 Jun 2010 09:44:13 -0700	[thread overview]
Message-ID: <AANLkTimPDymUsBJICkPlnyeFuFLA5Ek80j_aNQH5rXGo@mail.gmail.com> (raw)
In-Reply-To: <20100602121901.6ce71329@csr.com>

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 <Peter.Stephenson@csr.com> wrote:
> On Wed, 2 Jun 2010 00:05:20 -0700
> Martin Buchholz <martinrb@google.com> 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@csr.com>            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
>


  reply	other threads:[~2010-06-02 16:44 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-01 21:23 Martin Buchholz
2010-06-01 21:45 ` Peter Stephenson
2010-06-01 22:27   ` Martin Buchholz
2010-06-02  7:05   ` Martin Buchholz
2010-06-02 11:19     ` Peter Stephenson
2010-06-02 16:44       ` Martin Buchholz [this message]
2010-06-03  9:01         ` Peter Stephenson
2010-06-03 13:22           ` Martin Buchholz
2010-06-03 13:32             ` Peter Stephenson
2010-06-03 13:47               ` Martin Buchholz
2010-06-03 14:15               ` Bart Schaefer
2010-06-03 14:20                 ` Peter Stephenson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AANLkTimPDymUsBJICkPlnyeFuFLA5Ek80j_aNQH5rXGo@mail.gmail.com \
    --to=martinrb@google.com \
    --cc=Peter.Stephenson@csr.com \
    --cc=jbebel@google.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).