From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 703 invoked from network); 11 Feb 2002 09:14:00 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 11 Feb 2002 09:14:00 -0000 Received: (qmail 23424 invoked by alias); 11 Feb 2002 09:13:51 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 16598 Received: (qmail 23411 invoked from network); 11 Feb 2002 09:13:50 -0000 From: Sven Wischnowsky MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15463.35595.321048.104361@wischnow.berkom.de> Date: Mon, 11 Feb 2002 10:12:43 +0100 To: zsh-workers@sunsite.dk Subject: Re: ssh completion problem In-Reply-To: <20020208094052.89650.qmail@web9307.mail.yahoo.com> References: <20020208094052.89650.qmail@web9307.mail.yahoo.com> X-Mailer: VM 6.95 under 21.5 (patch 3) "asparagus" XEmacs Lucid Oliver Kiddle wrote: > Bart wrote: > > > > Right again, so far ... however, in looking at my own _complete_debug > > output *before* applying your patch, the odd thing is that the first > > compadd is failing for no apparent reason. That is, for completion > after > > `lll@', it does `tmp=(bbb.com)' and `compadd -F _comp_ignore -a tmp', > > but even though bbb.com is not ignored, still the compadd returns 1. > > I can't reproduce that. You need to set some ignored-patterns styles to split into host, host-with-domain and ip-address. > ... > > Only dividing tags into labels before compadds might be a way to > solve this. I need to investigate further because I don't fully > understand how tags and labels work. I may have badly misunderstood > things so far. Sven? Your analysis is basically right, the problem is that _combination doesn't know whether there might be other matches be added for the tag by an outer loop. So I think what is wrong here is _combination adding default matches. I'd think that's simlpy the wrong place to do that. One way to circumvent most problems with tag and label loops is to make _combination loop: --- Completion/Base/Utility/_combination Mon Apr 2 13:10:08 2001 +++ _combination Mon Feb 11 09:38:06 2002 @@ -88,7 +88,9 @@ fi tmp=( ${tmp%%${~sep}*} ) - compadd "$@" -a tmp || { (( $+functions[_$key] )) && "_$key" "$@" } + local expl + _wanted $key expl $key compadd "$@" -a tmp || + { (( $+functions[_$key] )) && "_$key" "$@" } else (( $+functions[_$key] )) && "_$key" "$@" fi This patch can't be complete, though (only something to play with and then decide if we want to go this way), because to make this right we need to pass _combination a description. > This is unrelated but out of interest, why is the _next_labels stage > skipped in some completion functions? Could you ive me an example, so that I don't need to search? Bye Sven -- Sven Wischnowsky wischnow@berkom.de