Tab Completion In Emacs shell-mode SSH Sessions

Posted by Sean M on Super User See other posts from Super User or by Sean M
Published on 2011-01-12T17:01:57Z Indexed on 2011/01/12 17:55 UTC
Read the original article Hit count: 285

Filed under:
|
|
|
|

My current use pattern of emacs results in my having several shell-mode buffers open, each running an ssh session. I am running into an issue with this, though - when I try to tab-complete file names and other things in my remote session, the shell attempts to use completions available on the local machine instead of on the remote machine.

For example, if the file ~/foobar exists on the local machine and ~/frob exists on the remote machine, typing in ~/f and pressing tab results in ~/foobar instead of completing correctly. If I use ssh outside of emacs and try the same thing, I get the correct completion of ~/frob instead.

How can I get tab-completion to complete the way it does in normal ssh sessions ?

© Super User or respective owner

Related posts about linux

Related posts about bash