Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Bug#537283: homing in
- X-seq: zsh-workers 27240
- From: Peter Stephenson <pws@xxxxxxx>
- To: zsh-workers@xxxxxxxxxx, 537283@xxxxxxxxxxxxxxx
- Subject: Re: Bug#537283: homing in
- Date: Wed, 02 Sep 2009 16:20:10 +0100
- In-reply-to: <20090902150000.GA6966@xxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20090902070912.GA31041@xxxxxxxxxxxxxxxxxxxxxxxxxx> <20090902150000.GA6966@xxxxxxxx>
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@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