Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: zle_refresh trial patch (and unrelated bug)



"Bart Schaefer" wrote:
> 	builtin let fun == 0 && eval function "$var"
> 
> Ah, I see -- I did accept-line once before, which changed "(( fun == 0 ))"
> into "builtin let fun == 0", which is not being parsed correctly.

Nor will it ever be --- that's quite a serious bug.  `let' needs to
get each expression as one single argument, so it should be
   builtin let "fun == 0"
and I'm pretty sure it was until not all that long ago.

In fact, Zoltan has improved the lexing of ((...)) so that it's no
longer quite the same as a double quoted expression, so that my
original hack of turning the former into the latter for ease of
reconstructing the text is not quite so appropriate.

> Either the output of "functions" needs to get fixed for this case, or
> (probably better) the parser has to make "==" a reserved word so it is
> not interpeted as "$(which -p '=')".

This won't help here, but maybe == is common enough as a test to have
a special case anyway.

*** Src/subst.c~	Thu Oct 10 12:05:11 1996
--- Src/subst.c	Tue Nov 12 13:31:18 1996
***************
*** 371,377 ****
  	    *namptr = dyncat(hom, ptr);
  	    return 1;
  	}
!     } else if (*str == Equals && isset(EQUALS) && str[1]) {   /* =foo */
  	char sav, *pp, *cnam;
  
  	for (pp = str + 1; !isend2(*pp); pp++);
--- 371,378 ----
  	    *namptr = dyncat(hom, ptr);
  	    return 1;
  	}
!     } else if (*str == Equals && isset(EQUALS) && str[1]
! 	       && str[1] != Equals) {   /* =foo */
  	char sav, *pp, *cnam;
  
  	for (pp = str + 1; !isend2(*pp); pp++);

-- 
Peter Stephenson <pws@xxxxxx>       Tel: +49 33762 77366
WWW:  http://www.ifh.de/~pws/       Fax: +49 33762 77413
Deutches Electronen-Synchrotron --- Institut fuer Hochenergiephysik Zeuthen
DESY-IfH, 15735 Zeuthen, Germany.



Messages sorted by: Reverse Date, Date, Thread, Author