zsh-workers
 help / color / mirror / code / Atom feed
From: "Oliver Kiddle" <okiddle@yahoo.co.uk>
To: zsh-workers@sunsite.dk
Subject: Re: ssh completion problem
Date: Tue, 12 Feb 2002 09:18:54 +0000 (GMT)	[thread overview]
Message-ID: <20020212091854.12456.qmail@web9306.mail.yahoo.com> (raw)
In-Reply-To: <15463.35595.321048.104361@wischnow.berkom.de>

 --- Bart Schaefer <schaefer@brasslantern.com> wrote:

> I tried this patch, and it doesn't seem to help.  That is, if I have
a
> tag-order style, I get the same behavior as the old _combination: it
> completes the user part of the users-hosts from my-accounts, but then
> offers all possible hosts as completions for what comes after the @.
> 
> Is there something else I should be doing, or was that patch not
> meant to solve my problem?

Did you try the first patch? The second patch was there because it
demonstrates why I think this problem is more fundamental than just
_combination. If you just want to get this working, Sven's patch is
now perhaps a better bet as I see you've now done. Needing two tabs
is a separate issue which has come up before. A possible solution
to that might be some value in compstate which if set causes
completion to have another go if a first match was unambiguously
added. It'll be more complicated if l@b is to complete to lll@bbb.com
though.

Sven Wischnowsky <wischnow@berkom.de> wrote:

> > I can't reproduce that.
> 
> You need to set some ignored-patterns styles to split into host,
> host-with-domain and ip-address.

I did have ignored-patterns styles set - '*.*' (host), '^[^0-9]*.*'
(domain) and '^[0-9.]#' (ipaddr). Perhaps Bart's use of different
patterns was significant though.

> 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.

Where is the right place to add default matches then? Having a way to
specify a default tag-order would seem the most logical to me.

> One way to circumvent most problems with tag and label loops is to
> make _combination loop:

With this there is then two loops for the hosts tag. The inner loop
allows it to loop over the three labels again so it knows if matches
are added for each label or not. Note that there are then nine calls to
compadd. It only works because the final (innermost) label loop is for
the same tag that is separated into labels. I still am convinced that
there is a wider problem which this doesn't solve. The second patch
in my last post is a useful one for seeing the problems.

> > This is unrelated but out of interest, why is the _next_labels
stage
> > skipped in some completion functions?
> 
> Could you give me an example, so that I don't need to search?

_netscape. There's also a few cases which look like `_requested users
&& _users && ret=0' but I suppose they're okay because of _users
calling _wanted? 

Oliver

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com


  parent reply	other threads:[~2002-02-12  9:19 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 [this message]
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

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=20020212091854.12456.qmail@web9306.mail.yahoo.com \
    --to=okiddle@yahoo.co.uk \
    --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).