选项卡完成在Emacs的shell模式SSH会话 [英] Tab Completion In Emacs shell-mode SSH Sessions
问题描述
例如,如果文件〜/ foobar
存在于本地机器上,〜 / froc
存在于远程计算机上,键入〜/ f
,然后按Tab键结果〜/ foobar
而不是正确完成。如果我在emacs之外使用ssh并尝试相同的东西,我可以正确地完成〜/ frob
。
如何在普通ssh会话中完成标签完成方式?
: Mx cd RET /ssh:host.example.com:/path/to/me 也似乎推动它能够优雅地处理标签完成。
当ssh-ing到其他机器时,emacs无法跟踪当前目录(default-direcotry)。
您可以将默认目录设置为流动文件名,如 / ssh:YOURHOST:/ home / dir我们在远程机器上启动shell会话,主要是通过tramp-bookmarks / shell来自动调整默认目录。$ / b $ b但是在远程文件中的远程跟踪中存在一个错误,该文件在trunk(未发布)中已修复。 http://comments.gmane.org/gmane.emacs.bugs/39082 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 How can I get tab-completion to complete the way it does in normal ssh sessions ? Later note: M-x cd RET /ssh:host.example.com:/path/to/me also seems to nudge it into being able to gracefully deal with tab completion. emacs can't track the current directory (default-direcotry) when ssh-ing to other machines. You could set default-directory to a tramp file-name like /ssh:YOURHOST:/home/dir" on your current shell-buffer manually. I start shell-sessions on a remote maching mostly via tramp-bookmarks/shell. Tramp set's default-directory automatically.
But there is a bug in direcotry tracking on remote files, which is fixed in trunk (unreleased). http://comments.gmane.org/gmane.emacs.bugs/39082 这篇关于选项卡完成在Emacs的shell模式SSH会话的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
~/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.