zsh-workers
 help / color / mirror / code / Atom feed
From: Sven Wischnowsky <wischnow@berkom.de>
To: zsh-workers@sunsite.dk
Subject: Re: ssh completion problem
Date: Mon, 18 Feb 2002 15:28:42 +0100	[thread overview]
Message-ID: <15473.3994.480437.568568@wischnow.berkom.de> (raw)
In-Reply-To: <15465.13002.262337.128763@wischnow.berkom.de>


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@berkom.de


      parent reply	other threads:[~2002-02-18 14:29 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1020205170847.ZM29675@candle.brasslantern.com>
2002-02-06  9:00 ` Oliver Kiddle
2002-02-07  1:54   ` Bart Schaefer
2002-02-08  9:40     ` Oliver Kiddle
2002-02-08 18:26       ` Bart Schaefer
2002-02-11  9:12       ` Sven Wischnowsky
2002-02-11 18:04         ` Bart Schaefer
2002-02-12  9:18         ` Oliver Kiddle
2002-02-12 13:16           ` Sven Wischnowsky
2002-02-12 15:08             ` Oliver Kiddle
2002-02-12 15:20               ` Sven Wischnowsky
2002-02-15 17:15                 ` Oliver Kiddle
2002-02-18 14:28                 ` Sven Wischnowsky [this message]

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=15473.3994.480437.568568@wischnow.berkom.de \
    --to=wischnow@berkom.de \
    --cc=zsh-workers@sunsite.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).