开发者

Tab autocompletion in bash vi shell mode

开发者 https://www.devze.com 2022-12-20 12:30 出处:网络
When using开发者_如何学Go MSYS on a windows platform, I \"set -o vi\" to use the vi shell mode. Tab autocompletion for files and directories stops working. How to I renable this while remaining in vi

When using开发者_如何学Go MSYS on a windows platform, I "set -o vi" to use the vi shell mode. Tab autocompletion for files and directories stops working. How to I renable this while remaining in vi shell mode?


Try:

bind -q complete

to see if it's set.

To set it at the Bash prompt:

bind '"\C-i":complete'

It should already be set by default, but it may be overridden in /etc/inputrc or ~/.inputrc possibly inside a $if mode=vi / $endif block. You can set for subsequent shell starts by adding this line to your ~/.inputrc file:

"\C-i": complete


For dir/file name completion try: ESC-\ or ESC-= or ESC-*

In my case (ubuntu 18.04) it doesn't work for commands.

0

精彩评论

暂无评论...
验证码 换一张
取 消