在Emacs的shell模式猛砸自动完成 [英] Bash autocompletion in Emacs shell-mode

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

问题描述

在GNOME终端,Bash是智能的自动完成功能。例如:

In the GNOME Terminal, Bash does smart auto-completion. For example

apt-get in<TAB>

变为

apt-get install

在Emacs的外壳模式,这个自动完成不工作,即使我明确地源的/ etc / bash_completion 。上面的例子中坚持为或者在当前目录中的有效 apt-get的的文件名,而不是自动完成命令选项。 presumably,这是因为Emacs的被拦截选项卡键盘preSS。我如何能够在壳模智能自动完成

In Emacs shell-mode, this auto-completion doesn't work, even after I explicitly source /etc/bash_completion. The above example sticks as in or auto-completes with a filename in the current directory rather than a valid apt-get command option. Presumably, this is because Emacs is intercepting the Tab key-press. How do I enable smart auto-completion in shell-mode?

推荐答案

我知道这个问题是三十岁了,但它的东西,我也一直感兴趣的解决。网络搜索指示我一块的elisp的,使Emacs的使用的bash在shell模式完成。它为我工作,在任何情况下。

I know this question is three years old, but it's something that I've also been interested in solving. A Web search directed me to a piece of elisp that makes Emacs use bash for completion in shell mode. It works for me, in any case.

检查出来的<一个href=\"https://github.com/szermatt/emacs-bash-completion\">https://github.com/szermatt/emacs-bash-completion

这篇关于在Emacs的shell模式猛砸自动完成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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