Ed Avis
Wed, 25 Jul 2001 05:22:23 -0700
On Wed, 25 Jul 2001, Kai [iso-8859-1] Großjohann wrote: >In particular, Tramp does "cd /some/dir", followed by "ls -la". It >seems that this would be somewhat difficult to achieve if you prefix >every command with "fsh"? Probably % fsh host sh -c 'cd /some/dir; ls -la' would do it. But is it worth bothering? I suggested fsh and fcp because I just assumed that tramp would execute single commands to get or put a file, and maybe the occasional command to run version-control stuff or get a directory listing. Since fsh is a drop-in replacement for ssh (*apart* from the interactive stuff, which I didn't make clear before), I thought it would be easy to add. If it would require substantial changes to what tramp does, it doesn't seem worth doing. Somehow it seems cleaner to me to run an external command whose job is 'get this file' rather than have Emacs run ssh in the background and send commands to it. A lot of the messiness you talked about with different versions of ls would not be necessary if there were also an 'rls' or 'sls' command with a standard set of options. It would be someone else's problem to deal with any strangeness on the remote system. And I got the impression from the web page that internal connection methods were slower and vaguely deprecated, and that it's preferable to use the rsh or ssh methods. But if the internal connection methods already reuse connections (which I think they do), and they're not slow or otherwise broken, and if fsh is not such a drop-in replacement as I hoped, then it would probably be better to just update the web page with a note saying: if your connections take a long time to set up, use an internal method, because it runs ssh only once and keeps it around. >>I thought that the out-of-band scp and rcp methods would just run >>scp or rcp to transfer files back and forth, so it would be easy to >>adapt them to fsh. Does tramp also require an actual prompt on the >>remote machine, even when files are transferred with scp? > >Yes, even then, Tramp requires an actual prompt. It wants to do >filename completion and dired and stuff. (Also, Tramp supports >remote RCS and sends "ci" and "co" commands to the remote end.) Personally I would feel more comfortable with running a single command like 'fsh somehost ls' rather than printing commands into a remote shell (though sometimes that is necessary). But I'm just a random person, and anyway since the tramp code is already written, it might as well be used. One question: If you use the rsync connection method, for example, what happens when tramp needs a directory listing or to check stuff out from RCS? -- Ed Avis [EMAIL PROTECTED]