zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <pws@csr.com>
To: zsh-workers@sunsite.dk, 537283@bugs.debian.org
Subject: Re: Bug#537283: homing in
Date: Wed, 02 Sep 2009 16:20:10 +0100	[thread overview]
Message-ID: <200909021520.n82FKAZC002462@news01.csr.com> (raw)
In-Reply-To: <20090902150000.GA6966@scru.org>

Clint Adams wrote:
> On Wed, Sep 02, 2009 at 09:09:12AM +0200, martin f krafft wrote:
> > % precmd_test() { set -x; test -d . && echo . is a directory; set +x; }
> > % precmd_functions=(precmd_test)
> > +precmd_test:0> test -d .
> > +precmd_test:0> echo . is a directory
> > . is a directory
> > +precmd_test:0> set +x
> > % [PRESS CTRL-C]
> > +precmd_test:0> test -d .
> > precmd_test:test: argument expected
> > +precmd_test:0> set +x

Incomplete previous patch (27079).

Index: Src/builtin.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/builtin.c,v
retrieving revision 1.234
diff -u -r1.234 builtin.c
--- Src/builtin.c	24 Jul 2009 18:35:53 -0000	1.234
+++ Src/builtin.c	2 Sep 2009 15:18:03 -0000
@@ -5818,17 +5818,19 @@
     testlex();
     prog = parse_cond();
     condlex = zshlex;
-    lexrestore();
 
     if (errflag) {
 	errflag = 0;
+	lexrestore();
 	return 1;
     }
 
     if (!prog || tok == LEXERR) {
 	zwarnnam(name, tokstr ? "parse error" : "argument expected");
+	lexrestore();
 	return 1;
     }
+    lexrestore();
 
     if (*curtestarg) {
 	zwarnnam(name, "too many arguments");

-- 
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:[~2009-09-02 15:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20090902070912.GA31041@piper.oerlikon.madduck.net>
2009-09-02 15:00 ` Clint Adams
2009-09-02 15:20   ` Peter Stephenson [this message]

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=200909021520.n82FKAZC002462@news01.csr.com \
    --to=pws@csr.com \
    --cc=537283@bugs.debian.org \
    --cc=zsh-workers@sunsite.dk \
    /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).