有一个像emacs dabbrev-expand的linux shell的功能吗?壳的动态缩略扩展
Q
壳的动态缩略扩展
2
A
回答
3
首先给出一个定义:
的Mx描述功能输入 dabbrev-扩大输入
...
Expands to the most recent, preceding word for which this is a prefix.
鉴于bash
似乎是最沉重的Emacs的影响,寻找有首先揭示几种可能性:
dynamic-complete-history (M-TAB)
Attempt completion on the text before point, comparing the text
against lines from the history list for possible completion matches.
dabbrev-expand
Attempt menu completion on the text before point, comparing the text
against lines from the history list for possible completion matches.
默认情况下(或我的系统至少),M-/已经绑定到complete-filename
:
$ bind -l | grep/
"\e/": complete-filename
你可以重新绑定它通过把
"\e/": dabbrev-expand
您的
~/.inputrc
或
/etc/inputrc
中的
。
请注意,它似乎只完成第一个单词(命令),并且只能从历史记录中,而不是从当前命令行完成,据我所知。
在zsh中,我看不到这样做的手册页中有任何内容,但应该可以通过找出适当的compctl
命令(Google mirror)来实现。
+0
非常感谢!你知道如何调用与特定键无关的emacs-like bash函数吗? – paweloque 2011-05-12 11:11:48
相关问题
- 1. 缩略图外壳扩展.NET
- 2. TFS外壳扩展策略失败
- 3. 动画扩展/缩小表
- 4. 动态类扩展
- 5. PHP动态扩展
- 6. Java中JTextArea的自动动态扩展/收缩
- 7. GNOME外壳扩展按钮
- 8. HtmlHelper扩展的动态
- 9. 动态扩展的类
- 10. 动态页面缩略图
- 11. 动态加载php扩展
- 12. asp.net:动态扩展内容
- 13. 动态JavaScript原型扩展
- 14. 动态扩展标签
- 15. 动态扩展一个类
- 16. PHP类扩展动态
- 17. Mysql动态表扩展列
- 18. 动态扩展jQuery插件
- 19. 如何在Groovy的外壳扩展?
- 20. 所选文件的外壳扩展
- 21. 教程的Windows外壳扩展
- 22. Accordion table cell - 如何动态扩展/收缩uitableviewcell?
- 23. 像GDrive一样的驱动器的外壳扩展?
- 24. 如何自动缩进LESS? (css扩展)
- 25. 嵌套的缩写扩展
- 26. RPX的缩写扩展?
- 27. 创建一个动态可扩展的布局和扩展
- 28. 如何扩展使用javascript加载YouTube上的缩略图
- 29. BASH外壳扩展参数与可变
- 30. 在Windows 7中调试外壳扩展
另请参阅:[引用第一个参数路径的快捷方式](http://stackoverflow.com/questions/5505827/is-there-any-shortcut-to-reference-the-path-of-the-第一个参数在mv命令)为不同的方式来实现类似的东西。 – Mikel 2011-05-12 09:41:42