【问题标题】:Can I get GNU Emacs to TAB complete filenames after using ssh in the *shell* buffer?在 *shell* 缓冲区中使用 ssh 后,我可以让 GNU Emacs 对完整的文件名进行制表符吗?
【发布时间】:2011-04-23 11:54:06
【问题描述】:

我正在使用 GNU Emacs 23.1.50.1 (i486-pc-linux-gnu)。

我想要的概念很简单,[TAB] 表示我按下 TAB 键。

M-x 外壳

erik@furby:~$ ls
bin 桌面文档 Dropbox R.tools

erik@furby:~$ cd Drop[TAB]

并且选项卡完成工作正常(即,Dropbox 已完成)

但是,一旦我 ssh,这将不再有效。

ssh erik@remote.edu
终端 = 哑
erik@remote:~> ls
私人的

erik@remote:~> cd priv[TAB]

小缓冲区显示 "没有完成 priv"

我发现其他人也有同样的问题,但是 无法辨别解决方案。

http://www.linuxforums.org/forum/red-hat-fedora-linux/56103-tab-completion-problem-ssh-shell-through-emacs.html

Emacs remote shell

【问题讨论】:

标签: shell emacs ssh


【解决方案1】:

好的,在我发布问题后,我偶然发现了 dirtrack-mode ,它似乎有一个解决方案,尽管并非完全微不足道。它使用ditrack-mode,作者说:

“当我通过 ssh 连接到另一台计算机时,我花了很长时间才弄清楚如何让 tab-completion 在 shell 模式下工作。”

多年来一直困扰着我;很高兴我不是唯一一个!

【讨论】:

  • 很遗憾你的链接失效了。 Is this the right one?同时,我将其替换为有关该主题的 emacswiki 文章。
【解决方案2】:

This answer to a duplicate 为我工作:

  1. C-x C-f /user@host:~(在远程服务器上以dired模式打开一个目录)
  2. M-x shell 在 dired 缓冲区中

【讨论】:

    【解决方案3】:

    如果您不使用ssh user@host 而使用cd /ssh:user@host:,则它适用于eshell,但它似乎不适用于shell

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-02-26
      • 2023-03-12
      • 1970-01-01
      相关资源
      最近更新 更多