[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: |
27 Aug 2002 22:36:01 +0200 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 |
lawrence mitchell <address@hidden> writes:
> I haven't looked at Michael's code, and hence, I'm slightly
> confused as to how it works. In particular, how does one go
> about completing host names? (is it that one can specify a list
> of hosts to which it is possible to connect?).
Nope. Once completion knowa the method to be used (either default method, or
explicitly given) it reads related files for possible completions. FTP
method reads .netrc (using ange-ftp), SSH method reads diverse
known_hosts files.
More difficult for RSH: it reads .rhosts, assuming there are similar
information like on the remote host (hoping for NFS shared home
directories).
Not implemented yet: TELNET (taking /etc/hosts) and SU (likely just
expanding to "address@hidden" only).
> > * If it looks like a method name, assume it's not a host name. This
> > has the nasty consequence that "/flarbl:" works today as a
> > filename, but if you then define a new method named "flarbl", then
> > things will cease to work.
>
> I'm not sure that's such a good idea either, as I (for example)
> set up methods with the same names as the hosts I connect to,
> it's easier to connect to multitudinous hosts this way.
> For example, if I connect to host foo, then I have a method named
> foo with the hostname hardcoded in.
So you won' profit from the code too much. If host name completion
detects "/foo:" (foo might be a method), nothing happens. So it isn't
worse at least :-)
If you're typing "/ss <TAB>", it will expand to "/ssh", offering all
ssh-like methods. If you type the next character (say ":~/"), it will
work like you know it. So not really usefull for _you_, but you can
let others have the fun ...
> > * Before trying to connect, look if the host really exists. But what
> > happens if the host exists and allows connections using ssh, but
> > the user doesn't have an account on that host?
>
> panic? :)
That's the todays implementation status, at least partially. But why
not to improve?
Best regards, Michael.