From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1590 invoked from network); 7 Feb 2002 01:55:12 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 7 Feb 2002 01:55:12 -0000 Received: (qmail 23268 invoked by alias); 7 Feb 2002 01:55:03 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 16580 Received: (qmail 23253 invoked from network); 7 Feb 2002 01:55:02 -0000 Date: Thu, 7 Feb 2002 01:54:45 +0000 (GMT) From: Bart Schaefer Sender: lantern@brasslantern.com To: =?iso-8859-1?q?Oliver=20Kiddle?= cc: zsh-workers@sunsite.dk Subject: Re: ssh completion problem In-Reply-To: <20020206090019.81014.qmail@web9301.mail.yahoo.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Wed, 6 Feb 2002, [iso-8859-1] Oliver Kiddle wrote: > I think the problem is due to this line in _combination: > > compadd "$@" -a tmp || { (( $+functions[_$key] )) && "_$key" "$@" } Yes, I thought that was it, too. > The line gets run for each of host hosts, domains and IP addresses. > Only one needs to fail for "_$key" (_hosts in effect) to go on to run. 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. If I remove the tag-order style, that stops happening. I don't know why there would be any interaction between the two, but there it is. > I think the patch below is the right fix - provided tmp can't be > different with each of the tags. This doesn't work as I want. With the patch, the values from users-hosts become the only possible matches, so I can't complete other hostnames.