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

Re: globcomplete bug + bug when compctl.so not loaded + init patch



Peter Stephenson wrote:

> This doesn't seem to fix it for me; there's still something wrong in
> addmatch() on the same test:
> 
> % setopt globcomplete
> % setopt glob*e<TAB>

Sorrysorrysorry, tested it only with files (ahem).

Bye
 Sven

--- os/Zle/zle_tricky.c	Wed Feb 24 16:09:57 1999
+++ Src/Zle/zle_tricky.c	Thu Feb 25 13:08:49 1999
@@ -4272,8 +4272,10 @@
 	    mpl = fpl; msl = fsl;
 	} else {
 	    if ((cp = filecomp)) {
-		if ((test = domatch(s, filecomp, 0)))
+		if ((test = domatch(s, filecomp, 0))) {
+		    e = s + sl;
 		    cc = 1;
+		}
 	    } else {
 		e = s + sl - fsl;
 		if ((test = !strncmp(s, fpre, fpl)))
@@ -4340,9 +4342,10 @@
 		  ((addwhat & CC_EXCMDS)  && !(hn->flags & DISABLED)))) ||
 		((addwhat & CC_BINDINGS) && !(hn->flags & DISABLED))))) {
 	if (sl >= rpl + rsl || mstack) {
-	    if (cp)
+	    if (cp) {
 		test = domatch(s, patcomp, 0);
-	    else {
+		e = s + sl;
+	    } else {
 		e = s + sl - rsl;
 		if ((test = !strncmp(s, rpre, rpl)))
 		    if ((test = !strcmp(e, rsuf))) {

--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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