Tab autocompletion in bash vi shell mode
Asked Answered
W

2

15

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?

Windowpane answered 12/2, 2010 at 13:53 Comment(0)
O
19

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
Odawa answered 12/2, 2010 at 14:27 Comment(1)
Excellent advice. emacs mode had settings, but vi mode did not. Easily added.Windowpane
B
0

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

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

Benuecongo answered 21/12, 2018 at 9:22 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.