3 ms·
Ah, I get it. Right now I just run commands remotely by prefixing ssh (actually I have aliases for the commonly connected machines). So it's ls for local
by gumby 6y ago
Ah, I get it.
Right now I just run commands remotely by prefixing ssh (actually I have aliases for the commonly connected machines). So it's
ls
for local list and
ssh remote ls
for remote's ls (actually I type
remote-name ls
).
So things like $! or ^ work as expected since they operate normally, but some quoting is indeed required (e.g. I usually want a pipeline to run entirely, or mostly, remotely).
But as each invocation invokes a fresh shell the remote connection is stateless. It would be nice if the shell could track things like
remote cd
and prefix subsequent commands with `cd`. This is hard to get right; there are so many ways to cd or pushd/popd (especially in `()` sub shells or with !:xx kinds of shortcuts) that they are hard to find. Emacs shell tries to keep a shell buffer's cwd in sync with the shell's but easily gets out of sync.
I have used the tramp interface and it's OK.
I wonder how useful this would really be; I typically run a bunch of things remotely and then have the result pipe back into a local executable. Thus anything that ran the pipeline remotely by default would need some quotology to differentiate the two, which exists now.