I am using GNU Emacs 23.1.50.1 (i486-pc-linux-gnu).
What I want is conceptually simple, [TAB] indicates that I press the TAB key.
M-x shell
erik@furby:~$ ls
bin Desktop Documents Dropbox R.toolserik@furby:~$ cd Dro开发者_如何学Gop[TAB]
and tab completion works fine (i.e., Dropbox is completed)
However, as soon as I ssh, this no longer works.
ssh erik@remote.edu
Terminal = dumb erik@remote:~> ls bin privateerik@remote:~> cd priv[TAB]
and the minibuffer displays "No completions of priv"
I've found others with the same problems, but could not discern the solution.
http://www.linuxforums.org/forum/red-hat-fedora-linux/56103-tab-completion-problem-ssh-shell-through-emacs.html
Emacs remote shell
OK, after I posted the question, I stumbled on dirtrack-mode , which appears to have a solution, although not entirely trivial. It uses dirtrack-mode, and the author says:
"It took me a long time to figure out how to get tab-completion working in shell-mode when I was ssh’d into another computer."
It's been annoying me for years; I'm glad I'm not the only one!
This answer to a duplicate worked for me:
C-x C-f /user@host:~
(open a directory on the remote server in dired mode)M-x shell
in the dired buffer
It works with eshell
if you instead of doing ssh user@host
you do cd /ssh:user@host:
however it doesn't seem to work with shell
.
精彩评论