Bash autocompletion in Emacs shell-mode

后端 未结 9 1473
有刺的猬
有刺的猬 2020-12-04 08:14

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

apt-get in

becomes

apt-get install
         


        
9条回答
  •  执笔经年
    2020-12-04 08:51

    I don't know the answer to this. But the reason that it doesn't work as you expect is probably because the completion in emacs shells is handled by emacs internally (by the comint-dynamic-complete function), and doesn't have those smart completion functions built-in.

    I'm afraid it is not an easy thing to fix.

    Edit: njsf's suggestion of using term-mode is probably as good as it gets. Start it with

    M-x term
    It is included in the standard emacs distribution (and in emacs21-common or emacs22-common on Ubuntu and Debian at least).

提交回复
热议问题