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

Re: Startup Time



awick@xxxxxxxxxxxxxxxxx wrote:
> 1)  ^ by itself crashes zsh.  (present since at least beta6)

This seems to be the minmal fix.  Although I'm not sure this is
documented, what ^ on it's own does is attempt to replace the last
pattern substituted with nothing in the previous history line.  This
was failing if there was no previous substitution.  This bug crept in
when I tidied up the history code: before, the code hacked the input
and the history code status so that it thought a real substitution
like !!^ was coming up, which handles this case.  If your dead set on
the message "no previous subsitution with &" here too, I can add that.

*** Src/hist.c~	Tue Nov  7 09:48:34 1995
--- Src/hist.c	Wed Nov  8 09:25:47 1995
***************
*** 152,158 ****
  	inungetc(hatchar);
  	if (!(ehist = gethist(defev))
  	    || !(sline = getargs(ehist, 0, ehist->nwords-1))
! 	    || getsubsargs(sline))
  	    return -1;
  	subst(&sline, hsubl, hsubr, 0);
      } else {
--- 152,158 ----
  	inungetc(hatchar);
  	if (!(ehist = gethist(defev))
  	    || !(sline = getargs(ehist, 0, ehist->nwords-1))
! 	    || getsubsargs(sline) || !hsubl)
  	    return -1;
  	subst(&sline, hsubl, hsubr, 0);
      } else {


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



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