[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
URL filename syntax?
URL filename syntax?
Mon, 14 Apr 2003 13:51:04 +0200
Gnus/5.090019 (Oort Gnus v0.19) Emacs/21.3.50 (gnu/linux)
Is it desirable to use URL-like syntax for remote files?
Currently, Tramp uses this format:
My idea is to use
where the initial slash is optional. The initial slash is needed to
provide the old magic slash behavior.
There are some issues with this:
* The URL syntax should be as close to the standard as possible. But
the ftp URL RFC states that an ftp URL looks like this:
where each component can be a string or empty. The semantics are
that the user agend does "CWD component1" followed by "CWD
component2" and so on.
This means that ftp://address@hidden/etc/motd refers to the file
~user/etc/motd on the remote host, as do ftp://address@hidden//etc/motd
and ftp://address@hidden/a/b/c//etc/motd. In order to reference
/etc/motd on the remote host, one has to use
I think we can't require our users to type %2F in such cases, and
therefore I propose to change the ftp URL syntax to interpret
ftp://address@hidden//foo as the file /foo on the remote host. (And
ftp://address@hidden/foo refers to ~user/foo.)
* Tramp allows to omit the method. How do I do that with URLs?
* Tramp also supports multi-hop connections, with a syntax like
where hopI looks like hop-method:address@hidden So, for example,
means to use telnet to log in as user kai on marvin, then use
/bin/su there to become root, then access the file /etc/passwd.
In the rare case where one would like to access a file/directory
whose name contains a colon, one can add slashes. So to access the
file "foo:bar" in root's homedir, one could use
which is unambiguous.
Clearly, multi://telnet:address@hidden/su:address@hidden/foo:bar will
not work so well... Hm. But I could support ~, too, so this would
become multi://telnet:address@hidden/su:address@hidden/~/foo:bar which
file-error; Data: (Opening input file no such file or directory ~/.signature)
- URL filename syntax?,
Kai Großjohann <=