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

Re: Oliver Kiddle: compctl -l broken and function installation



Oliver Kiddle wrote:

> The -l option to compctl seems to be broken. I first noticed this a
> while ago (about pws-18), it exists in pws-21 but wasn't there in a
> pws-16 I had lying about.
> 
> For example:
> zsh -f
> compctl -l '' t
> t <tab>
> 
> Gives a beep.

ccont was set to zero which caused the test after trying the
(non-existent) pattern compctl's to succeed -- and hence the
completion code stopped trying to generate matches.

The patch also makes `compctl -h' use ccont.

Bye
 Sven

diff -u os/Zle/zle_tricky.c Src/Zle/zle_tricky.c
--- os/Zle/zle_tricky.c	Tue Jun  8 15:23:27 1999
+++ Src/Zle/zle_tricky.c	Wed Jun  9 11:22:28 1999
@@ -5026,7 +5026,8 @@
 	char **ow = clwords, *os = cmdstr, *oqp = qipre, *oqs = qisuf;
 	int olws = clwsize, olwn = clwnum, olwp = clwpos;
 	int obr = brange, oer = erange, oof = offs;
-	
+	unsigned long occ = ccont;
+
 	clwsize = clwnum = countlinknodes(foo);
 	clwords = (char **) zalloc((clwnum + 1) * sizeof(char *));
 	for (n = firstnode(foo), i = 0; n; incnode(n), i++) {
@@ -5041,7 +5042,9 @@
 	qipre = qp;
 	qisuf = qs;
 	offs = soffs;
+	ccont = CC_CCCONT;
 	makecomplistcmd(ns, !clwpos, CFN_FIRST);
+	ccont = occ;
 	offs = oof;
 	zsfree(cmdstr);
 	cmdstr = os;
@@ -6500,7 +6503,7 @@
 	int oldn = clwnum, oldp = clwpos;
 	unsigned long occ = ccont;
 	
-	ccont = 0;
+	ccont = CC_CCCONT;
 	
 	/* So we restrict the words-array. */
 	if (brange >= clwnum)

--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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