Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tab autocompletion in bash vi shell mode

Tags:

bash

vi

msys

When using 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?

like image 469
William Avatar asked Feb 12 '10 13:02

William


1 Answers

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
like image 95
Dennis Williamson Avatar answered Oct 20 '22 02:10

Dennis Williamson