Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: ssh completion problem
- X-seq: zsh-workers 16668
- From: Sven Wischnowsky <wischnow@xxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: ssh completion problem
- Date: Mon, 18 Feb 2002 15:28:42 +0100
- In-reply-to: <15465.13002.262337.128763@xxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <15465.5565.960990.977033@xxxxxxxxxxxxxxxxxx> <20020212150805.94054.qmail@xxxxxxxxxxxxxxxxxxxxxx> <15465.13002.262337.128763@xxxxxxxxxxxxxxxxxx>
I wrote:
> ...
>
> > PS. You may know anyway but with the recent fake style patch (I think
> > the _wanted -x one) which you haven't commited, I get problems with
> > descriptions. grep -<tab> for example lists options and descriptions
> > separately. I haven't tried the very latest patch which has just
> > arrived in the last few minutes.
>
> Yes, I know, it was caused by the changes in the C-code and hence I
> didn't commit that part.
Here is an improved patch for that part. I was gettng doubled
descriptions (they got added to the wrong group in some cases).
Bye
Sven
Index: Src/Zle/compcore.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/compcore.c,v
retrieving revision 1.53
diff -u -r1.53 compcore.c
--- Src/Zle/compcore.c 22 Jan 2002 10:22:48 -0000 1.53
+++ Src/Zle/compcore.c 18 Feb 2002 14:29:22 -0000
@@ -1619,6 +1619,21 @@
Heap oldheap;
SWITCHHEAPS(oldheap, compheap) {
+ if (dat->dummies)
+ dat->aflags = ((dat->aflags | CAF_NOSORT | CAF_UNIQCON) &
+ ~CAF_UNIQALL);
+
+ /* Select the group in which to store the matches. */
+ gflags = (((dat->aflags & CAF_NOSORT ) ? CGF_NOSORT : 0) |
+ ((dat->aflags & CAF_UNIQALL) ? CGF_UNIQALL : 0) |
+ ((dat->aflags & CAF_UNIQCON) ? CGF_UNIQCON : 0));
+ if (dat->group) {
+ endcmgroup(NULL);
+ begcmgroup(dat->group, gflags);
+ } else {
+ endcmgroup(NULL);
+ begcmgroup("default", 0);
+ }
if (dat->mesg || dat->exp) {
curexpl = (Cexpl) zhalloc(sizeof(struct cexpl));
curexpl->always = !!dat->mesg;
@@ -1630,25 +1645,13 @@
curexpl = NULL;
} SWITCHBACKHEAPS(oldheap);
- if (!*argv && !dat->dummies && !(dat->aflags & CAF_ALL)) {
- SWITCHHEAPS(oldheap, compheap) {
- /* Select the group in which to store the matches. */
- gflags = (((dat->aflags & CAF_NOSORT ) ? CGF_NOSORT : 0) |
- ((dat->aflags & CAF_UNIQALL) ? CGF_UNIQALL : 0) |
- ((dat->aflags & CAF_UNIQCON) ? CGF_UNIQCON : 0));
- if (dat->group) {
- endcmgroup(NULL);
- begcmgroup(dat->group, gflags);
- } else {
- endcmgroup(NULL);
- begcmgroup("default", 0);
- }
- } SWITCHBACKHEAPS(oldheap);
-
+ if (!*argv && !dat->dummies && !(dat->aflags & CAF_ALL))
return 1;
- }
+
+#if 0
if (dat->dummies)
dat->aflags = (dat->aflags | CAF_NOSORT | CAF_UNIQCON) & ~CAF_UNIQALL;
+#endif
for (bp = brbeg; bp; bp = bp->next)
bp->curpos = ((dat->aflags & CAF_QUOTE) ? bp->pos : bp->qpos);
for (bp = brend; bp; bp = bp->next)
@@ -1880,17 +1883,6 @@
haspattern = 1;
}
}
- }
- /* Select the group in which to store the matches. */
- gflags = (((dat->aflags & CAF_NOSORT ) ? CGF_NOSORT : 0) |
- ((dat->aflags & CAF_UNIQALL) ? CGF_UNIQALL : 0) |
- ((dat->aflags & CAF_UNIQCON) ? CGF_UNIQCON : 0));
- if (dat->group) {
- endcmgroup(NULL);
- begcmgroup(dat->group, gflags);
- } else {
- endcmgroup(NULL);
- begcmgroup("default", 0);
}
if (*argv) {
if (dat->pre)
--
Sven Wischnowsky wischnow@xxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author