有一個像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. 多字縮略詞擴展
- 3. TFS外殼擴展策略失敗
- 4. 動畫擴展/縮小表
- 5. PHP動態擴展
- 6. 動態類擴展
- 7. Java中JTextArea的自動動態擴展/收縮
- 8. GNOME外殼擴展按鈕
- 9. 掙扎與外殼擴展
- 10. HtmlHelper擴展的動態
- 11. 動態擴展的TreeView
- 12. 動態擴展的類
- 13. 動態頁面縮略圖
- 14. 動態縮略圖用PHP
- 15. 動態gif縮略圖
- 16. 動態縮略圖HTML?
- 17. 靜態和擴展方法策略
- 18. 動態擴展Django表格
- 19. 擴展動態背景
- 20. 動態擴展標籤
- 21. asp.net:動態擴展內容
- 22. 動態擴展一個類
- 23. 動態JavaScript原型擴展
- 24. 動態擴展jQuery插件
- 25. PHP類擴展動態
- 26. 動態加載php擴展
- 27. Mysql動態表擴展列
- 28. 動態擴展形狀
- 29. 如何在Groovy的外殼擴展?
- 30. 所選文件的外殼擴展
另請參閱:[引用第一個參數路徑的快捷方式](http://stackoverflow.com/questions/5505827/is-there-any-shortcut-to-reference-the-path-of-the-第一個參數在mv命令)爲不同的方式來實現類似的東西。 – Mikel 2011-05-12 09:41:42