7

In my local shell, completion-at-point after cd returns a list of directories. However, when I ssh into a remote, Emacs thinks I'm still in my local home directory. How can I configure Emacs to give me remote directory autocompletion?

  • Just to clarify, you're doing M-x shell from a local directory and then doing ssh command in that buffer? – Melioratus Nov 8 '15 at 20:39
  • That is correct. – Matthew Piziak Nov 8 '15 at 20:41
  • 1
    Have you tried using opening the remote directory using C-x d /ssh:username@hostname:/directory-path and then using M-x shell to open a remote shell? – Melioratus Nov 8 '15 at 20:54
  • Interesting! Now autocompletion works, but typing is intolerably slow. – Matthew Piziak Nov 8 '15 at 20:57
  • 1
    I tried disabling global-projectile-mode and the situation improved significantly! – Matthew Piziak Nov 10 '15 at 15:12
4
+50

Try this

  1. Open a remote directory in dired using tramp.

    C-x d /ssh:username@hostname:/path return

  2. Start a remote shell.

    M-x shell

  • Is there a way to make something like this work with Emacs term or preferably multi-term – WanderingMind Feb 15 '16 at 13:02

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.