Matthew Curry <[email protected]> writes: > I guess I'm confused, if you *start* a shell on a remote host via > tramp (and I'm not talking about ssh'ing in from a shell buffer you've > already started directly, that's totally different and that's obvious > why it wouldn't work), how is it *ever* useful to refer to files on > the local host? [e]shell-mode should *always* use the remote host's > filesystem for all [e]shell-mode tasks.
Eshell does not open a shell on the remote host. It is able to run processes wherever - that's a difference. The processes are performed on the host, default-directory is pointing to. You could do the following: ~ $ cp /sudo::/etc/shadow /tmp/123 ~ $ diff /sudo::/etc/passwd /ssh:r...@anotherhost:/etc/passwd Your are still on the local host; if you call a program, it will be applied here. If you do a "cd" to a remote directory, the next programs will be applied there. And after that, you could even apply the next "cd" etc. See this example ~ $ hostname mylocalhost ~ $ cd /ssh:anotherhost: /ssh:u...@anotherhost:/home/user $ hostname anotherhost /ssh:u...@anotherhost:/home/user $ > Now maybe there is a reason why it acts like it does, but I'm not sure > why yet. Do you know how [e]shell-mode keeps track of the current > directory of the shell it runs? Like any other Emacs function: it uses default-directory. "cd" changes its value. > -Matt Best regards, Michael. _______________________________________________ Tramp-devel mailing list [email protected] http://lists.gnu.org/mailman/listinfo/tramp-devel
