4

I start a tramp dired session to a remote host with C-x d /ssh:user@host:/ and then start eshell with M-x eshell.

This places me at the dired path on the remote host, however as soon as I try to cd or get path autocompletion my session then changes to my localhost.

Is this the intended functionality? How can I make eshell remain on the remote host?

retrodev
  • 295
  • 1
  • 9

1 Answers1

3

When you apply cd in eshell, it uses the Lisp function eshell/cd. All file names that you give are therefore interpreted like file names in Emacs. Absolute file names, without the remote prefix, correspond to the local file system, therefore.

If you want to navigate on the remote host, use relative file names like cd ../foo. You could use even file name completion in eshell, like cd ../ <TAB>.

Michael Albinus
  • 6,647
  • 14
  • 20
  • That works, thanks. It's certainly far from intuitive though. What would be your recommended method for remote shells in Emacs? – retrodev May 03 '16 at 13:33
  • Personally, I don't use remote shells. No recommendation therefore. Under the hood, all of them use `ssh` for connection. – Michael Albinus May 04 '16 at 09:15