1

I'm connecting to remote server using emacs shell. Emacs shell displays directory listings with proper coloring and auto completion when working with local machine.

But when I use ssh the autocompletion and coloring are gone. Same holds for eshell.

Is there a way to fix this without resorting to M-x term? Because emacs keys don't work in term which is a real productivity killer.

There is a similar question here. But that is rather about emacs in SSH instead of SSH in emacs.

0

In a *shell* or eshell buffer, Emacs performs file completion on its own, by looking at the local filesystem. This can't work if you're logged in to a remote machine over SSH.

In order to get completion of remote files, Emacs would have to let the shell handle the Tab key. But Emacs's handling of Tab and other keys is what distinguishes *shell* from *term*.

In eshell, you can access remote directories via Tramp. For example, cd /servername:/remote/path gives you a shell in a remote directory accessed over SSH. Completion works if you do the remote connection this way.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.