[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: User/host name completion: how to deal with ambiguity?
From: |
Michael Albinus |
Subject: |
Re: User/host name completion: how to deal with ambiguity? |
Date: |
28 Aug 2002 09:42:33 +0200 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 |
address@hidden (Kai =?iso-8859-15?q?Gro=DFjohann?=) writes:
> The new filename format on Emacs looks like this:
>
> /method:address@hidden:path
>
> The method and the user can be omitted. Now Michael has done some
> great work on allowing completion on incomplete Tramp filenames. For
> example, if you type
>
> /ssh:au<TAB>
>
> then you get a list of all host names starting with "au". Tres
> cool. (Maybe you should also get a list of user names starting
> "au". Not sure if this happens.)
Should so if method related completion offers user names.
> But there is an ambiguity problem. Take the following filename as an
> example:
>
> /ssh:
>
> It could be a complete Tramp filename specifying the home directory
> on the host ssh, using the default method and the default user.
>
> It could also be a partial Tramp filename specifying the ssh method.
>
> Michael's code now tries to look for all possibilities, so it tries
> to open a connection to the host ssh using the default method and the
> default user. This, however, is wont to fail, leaving the user
> flabbergasted.
>
> Suggestions?
I've slept a night over the proposals. A possible scenario could be:
* Expand `/foo' to file / method / (user@)host (acc default
method). Don't expand it to `/foo:host', even if method `foo' is
unique already.
* Expand `/foo:' to `/foo:host' if `foo' is a method. Ignore
possibility that `foo' might be a host name at this stage of
expansion. This must be expressed explicitly either by an FQDN of
the host name (`/foo.domain:'), or by a character after the colon,
which doesn't match user/host name syntax, like `.', `/' or `~'. If
`foo.domain' is contained in the resp files (f.e. ssh_known_hosts),
it will be offered during expansion of `/foo'.
Comments?
> kai
Best regards, Michael.