Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: Re: 3.1.6-dev-22
- X-seq: zsh-workers 10690
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: PATCH: Re: 3.1.6-dev-22
- Date: Wed, 12 Apr 2000 11:10:12 +0200 (MET DST)
- In-reply-to: Peter Stephenson's message of Tue, 11 Apr 2000 21:19:31 +0100
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
Peter Stephenson wrote:
> Sven Wischnowsky wrote:
> > So, I would like to make the question: should we remove it?
>
> If even the completion system as it is doesn't need it, I think it's a good
> bet that commenting out at this stage won't cause any problems.
Here is the patch. Lotsa `#if's.
Bye
Sven
Index: Doc/Zsh/compwid.yo
===================================================================
RCS file: /cvsroot/zsh/zsh/Doc/Zsh/compwid.yo,v
retrieving revision 1.3
diff -u -r1.3 compwid.yo
--- Doc/Zsh/compwid.yo 2000/04/04 11:26:26 1.3
+++ Doc/Zsh/compwid.yo 2000/04/12 09:08:20
@@ -280,24 +280,19 @@
On exit it may be set to any of the values above (where setting it to
the empty string is the same as unsetting it), or to a number, in which
case the match whose number is given will be inserted into the command line.
-It may also be set to a string of the form `var(group):var(match)' which
-specifies a match from a group of matches to be inserted, counting from 1
-upwards (e.g. `tt(2:4)' specifies the fourth match of the second group).
-Negative numbers count backward from the last match or group (with `tt(-1)'
-selecting the last match or group) and out-of-range values are wrapped
-around, so that a value of zero selects the last match or group and a value
+Negative numbers count backward from the last match (with `tt(-1)'
+selecting the last match) and out-of-range values are wrapped
+around, so that a value of zero selects the last match group and a value
one more than the maximum selects the first. Unless the value of this
key ends in a space, the match is inserted as in a menu-completion,
i.e. without automatically appending a space.
Both tt(menu) and tt(automenu) may also specify the the number of the
-match to insert, given after a colon, optionally followed by a second
-colon and a group number. For example, `tt(menu:2)' says to start
-menu-completion, beginning with the second match and `tt(menu:3:2)'
-says to start menu-completion with the third match in the second group.
+match to insert, given after a colon. For example, `tt(menu:2)' says
+to start menu-completion, beginning with the second match.
-It may also be set to tt(all), which makes all matches generated be
-inserted into the line.
+Finally, it may also be set to tt(all), which makes all matches
+generated be inserted into the line.
)
vindex(to_end, compstate)
item(tt(to_end))(
Index: Src/Zle/compcore.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/compcore.c,v
retrieving revision 1.5
diff -u -r1.5 compcore.c
--- Src/Zle/compcore.c 2000/04/10 08:06:39 1.5
+++ Src/Zle/compcore.c 2000/04/12 09:08:21
@@ -60,8 +60,12 @@
/* The match and group number to insert when starting menucompletion. */
/**/
-mod_export int insmnum, insgnum, insgroup, insspace;
+mod_export int insmnum, insspace;
+#if 0
+int insgnum, insgroup; /* mod_export */
+#endif
+
/* Information about menucompletion. */
/**/
@@ -753,10 +757,12 @@
useline = 1; usemenu = 3;
insmnum = atoi(compinsert);
+#if 0
if ((m = strchr(compinsert, ':'))) {
insgroup = 1;
insgnum = atoi(m + 1);
}
+#endif
insspace = (compinsert[strlen(compinsert) - 1] == ' ');
} else {
char *p;
@@ -770,10 +776,12 @@
if (useline && (p = strchr(compinsert, ':'))) {
insmnum = atoi(++p);
+#if 0
if ((p = strchr(p, ':'))) {
insgroup = 1;
insgnum = atoi(p + 1);
}
+#endif
}
}
startauto = ((compinsert &&
@@ -840,8 +848,12 @@
mnum = 0;
unambig_mnum = -1;
isuf = NULL;
- insmnum = insgnum = 1;
- insgroup = oldlist = oldins = 0;
+ insmnum = 1;
+#if 0
+ insgnum = 1;
+ insgroup = 0;
+#endif
+ oldlist = oldins = 0;
begcmgroup("default", 0);
menucmp = menuacc = newmatches = onlyexpl = 0;
Index: Src/Zle/compctl.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/compctl.c,v
retrieving revision 1.1.1.45
diff -u -r1.1.1.45 compctl.c
--- Src/Zle/compctl.c 2000/03/14 11:18:01 1.1.1.45
+++ Src/Zle/compctl.c 2000/04/12 09:08:22
@@ -1812,8 +1812,12 @@
mnum = 0;
unambig_mnum = -1;
isuf = NULL;
- insmnum = insgnum = 1;
- insgroup = oldlist = oldins = 0;
+ insmnum = 1;
+#if 0
+ insgnum = 1;
+ insgroup = 0;
+#endif
+ oldlist = oldins = 0;
begcmgroup("default", 0);
menucmp = menuacc = newmatches = onlyexpl = 0;
Index: Src/Zle/compresult.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/compresult.c,v
retrieving revision 1.4
diff -u -r1.4 compresult.c
--- Src/Zle/compresult.c 2000/04/12 08:31:55 1.4
+++ Src/Zle/compresult.c 2000/04/12 09:08:22
@@ -1076,6 +1076,7 @@
} else
minfo.cur = NULL;
}
+#if 0
if (insgroup) {
insgnum = comp_mod(insgnum, lastpermgnum);
for (minfo.group = amatches;
@@ -1088,6 +1089,7 @@
}
insmnum = comp_mod(insmnum, (minfo.group)->mcount);
} else {
+#endif
insmnum = comp_mod(insmnum, lastpermmnum);
for (minfo.group = amatches;
minfo.group && (minfo.group)->mcount <= insmnum;
@@ -1098,7 +1100,9 @@
minfo.asked = 0;
return;
}
+#if 0
}
+#endif
mc = (minfo.group)->matches + insmnum;
do_single(*mc);
minfo.cur = mc;
--
Sven Wischnowsky wischnow@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author