Leopard终端(和iTerm)忽略控制键组合 [英] Leopard Terminal (and iTerm) Ignores Control Key Combos
问题描述
我很习惯使用 Ctrl + A , Ctrl + E / kbd> + L 等作为操作的快捷方式(行开始,行结束,清除终端等)。我不能为我的生活得到这个工作与Terminal.app或iTerm在OS 10.5上。
我知道一个事实,它在老虎,我甚至知道一些其他Leopard用户没有任何问题,但是当我尝试使用控制键,它只是打印文字结果(例如 - ^ A
)到屏幕。 / p>
我的相关环境变量:
TERM = linux xterm-color)
SHELL = / bin / bash
COMMAND_MODE = unix2003(也尝试过旧版)
b $ b
任何想法?
- .inputrc(如果此文件不存在,bash应该使用/ etc / inputrc作为系统范围的初始化,但我总是更喜欢显式)
-
nauseating emacs voodoo bindings instead of sweet,clean vi:
设置-o emacs
设置编辑模式emacs
在上面,记住emacs模式是默认模式,但你永远不会受到明确的伤害...
$ b $再次,你说你使用的是bash,所以运行:
bind -p
,以确保您拥有您认为有的绑定
-
最后,由于它是OSX,检查以确保你有readline库(这是你如何获得所有这些东西。)再次,
-
检查Terminal.app程序中的TERM设置(首选项>高级>仿真)
当你的ssh在别的地方工作时,意味着一个局部问题。
祝你好运。
I am very used to using Ctrl + A, Ctrl + E, Ctrl + L, etc. as shortcuts to operations (beginning of line, end of line, clear terminal, etc). I cannot for the life of me get this working with either Terminal.app or iTerm on OS 10.5.
I know for a fact that it works in Tiger and I even know some other Leopard users who don't have any problems, but when I try to use control key it just prints the literal results (eg - ^A
) to the screen.
My related environment variables:
TERM=linux (have also tried xterm-color)
SHELL=/bin/bash
COMMAND_MODE=unix2003 (have also tried legacy)
Any ideas?
- Make sure you have a file called ~/.inputrc ( if this file does not exist bash should use /etc/inputrc for system wide init, but I always prefer to be explicit )
In that file if you want the nauseating emacs voodoo bindings instead of sweet, clean vi:
set -o emacs set editing-mode emacs
In the above, remember that emacs mode is the default, but you never get hurt by being explicit...
Again, you said you were using bash, so run:
bind -p
at the shell prompt to ensure that you have the bindings you think you have
finally, since it's OSX, check to make sure you have the readline library ( which is how you get all this stuff.) Again, it should be there by default, but perhaps it is not.
Check the TERM setting in the Terminal.app program ( Preferences > Advanced > Emulation )
The fact that your rig works when you ssh somewhere else means implies a local problem.
Good luck.
这篇关于Leopard终端(和iTerm)忽略控制键组合的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!