Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: ssh completion problem



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.



Messages sorted by: Reverse Date, Date, Thread, Author