From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: PATCH: Re: 3.1.6-dev-22
Date: Wed, 12 Apr 2000 11:10:12 +0200 (MET DST) [thread overview]
Message-ID: <200004120910.LAA07597@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: Peter Stephenson's message of Tue, 11 Apr 2000 21:19:31 +0100
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@informatik.hu-berlin.de
next reply other threads:[~2000-04-12 9:10 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-04-12 9:10 Sven Wischnowsky [this message]
2000-04-12 16:21 ` Bart Schaefer
-- strict thread matches above, loose matches on Subject: below --
2000-04-13 8:07 Sven Wischnowsky
2000-04-11 15:04 Sven Wischnowsky
2000-04-11 12:37 Sven Wischnowsky
2000-04-11 8:28 Sven Wischnowsky
2000-04-11 12:32 ` Adam Spiers
2000-04-11 15:48 ` Bart Schaefer
2000-04-11 20:19 ` Peter Stephenson
2000-04-11 7:54 Sven Wischnowsky
2000-04-11 8:14 ` Andrej Borsenkow
2000-04-11 14:58 ` Bart Schaefer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200004120910.LAA07597@beta.informatik.hu-berlin.de \
--to=wischnow@informatik.hu-berlin.de \
--cc=zsh-workers@sunsite.auc.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).