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

Re: history



> zsh 1% zsh
> 
> zsh/2 1% !po<TAB><Ctrl-U>pop<TAB>zsh: 543 segmentation fault  zsh
> 
> zsh 2 [139 SEGV] % !po<ENTER>
> zsh: event not found: po

Completing words containing history bangchars is buggy.  The patch below
should fix that.

Zoltan

*** Src/zle_tricky.c	1996/07/09 13:37:36	2.57
--- Src/zle_tricky.c	1996/07/09 16:34:32
***************
*** 930,935 ****
--- 930,936 ----
  	lexsave();
  	inpush(dupstrspace((char *) linptr), 0);
  	strinbeg();
+ 	stophist = 2;
  	i = tt0 = cp = rd = 0;
  
  	/* This loop is possibly the wrong way to do this.  It goes through *
***************
*** 1147,1166 ****
  		}
  		chuck(p--);
  	    }
- 	if (unset(NOBANGHIST)) {
- 	    /* In qword bangchars (normally `!') are quoted if nobanghist is *
- 	     * unset. This code is not in line with the current bang quoting *
- 	     * rules.  We really need to get those sorted out.               */
- 	    q = tt = ncalloc(2 * strlen(qword) + 1);
- 	    for (p = qword; *p; p++) {
- 		if (*p == (char)bangchar)
- 		    *q++ = '\\';
- 		*q++ = *p;
- 	    }
- 	    *q = '\0';
- 	    zsfree(qword);
- 	    qword = ztrdup(tt);
- 	}
      } LASTALLOC;
      lexrestore();
  




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