选项​​卡完成在Emacs的shell模式SSH会话 [英] Tab Completion In Emacs shell-mode SSH Sessions

查看:150
本文介绍了选项​​卡完成在Emacs的shell模式SSH会话的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我有几个壳模式缓冲区的emacs的结果我现在的使用方式打开,每个运行的SSH会话。我遇到的问题与此,虽然 - 当我尝试在我的远程会话制表完整的文件名和其他东西,外壳尝试使用可用的落成在本地机器上,而不是在远程计算机上。

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.

例如,如果文件〜/ foobar的存在于本地计算机上,〜/ FROB 存在于远程机器上,在输入〜/˚F和pressing标签结果〜/ foobar的而不是正确地完成。如果我使用ssh的emacs之外,并尝试同样的事情,我得到的〜/ FROB 而不是正确的完成。

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.

我怎样才能得到制表完成,完成它在正常的SSH会话的方式?

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

后来注意:<大骨节病> M-个光驱RET /ssh:host.example.com:/path/to/me 也似乎它轻推到能够优雅地完成标签处理。

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.

推荐答案

SSH-ING到其他机器时的emacs无法跟踪当前目录下(默认direcotry)。

emacs can't track the current directory (default-direcotry) when ssh-ing to other machines.

您可以将默认目录以例如 / SSH流浪汉文件名:YOURHOST:/家居/目录您当前的手动壳缓冲

You could set default-directory to a tramp file-name like /ssh:YOURHOST:/home/dir" on your current shell-buffer manually.

我开始通过主要是流浪汉,书签/壳上的远程MACHING壳会议。流浪汉自动设置的默认目录。
但在direcotry一个bug远程文件跟踪,这是固定在躯干(未发行)。

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).

<一个href=\"http://comments.gmane.org/gmane.emacs.bugs/39082\">http://comments.gmane.org/gmane.emacs.bugs/39082

这篇关于选项​​卡完成在Emacs的shell模式SSH会话的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆