From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29122 invoked from network); 18 Feb 2002 14:29:52 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 18 Feb 2002 14:29:52 -0000 Received: (qmail 17025 invoked by alias); 18 Feb 2002 14:29:45 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 16668 Received: (qmail 16990 invoked from network); 18 Feb 2002 14:29:44 -0000 From: Sven Wischnowsky MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15473.3994.480437.568568@wischnow.berkom.de> Date: Mon, 18 Feb 2002 15:28:42 +0100 To: zsh-workers@sunsite.dk Subject: Re: ssh completion problem In-Reply-To: <15465.13002.262337.128763@wischnow.berkom.de> References: <15465.5565.960990.977033@wischnow.berkom.de> <20020212150805.94054.qmail@web9302.mail.yahoo.com> <15465.13002.262337.128763@wischnow.berkom.de> X-Mailer: VM 6.95 under 21.5 (patch 3) "asparagus" XEmacs Lucid 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 - 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