Cause
I had the same problem: Ctrl+I or Tab Tab on an empty input line in Git Bash on Windows was taking up to 7 seconds before showing Display all 5413 possibilities? (y or n)
and Ctrl+C was not stopping the search ... very frustrating because I frequently enter Tab Tab inadvertently.
This behavior was happening both inside and outside Git repositories.
This is due to the command
completion action being slow on Git Bash (possibly because of a slower Windows filesystem ?).
Solution
Add this line to ~/.bashrc
:
complete -Ef # fix slow empty line autocompletion in Git Bash
-E
configures the completion on empty line and -f
sets the action to file
(list the files in the current directory).
And if you never want empty line completion (e.g. if it only happens inadvertently) you can use complete -E
instead.
See Bash manual on Programmable Completion Builtins for more documentation.
I got help from this answer
CTRL I
is tab, IIRC. – Zulazulchctrl-\
work perhaps? – Kami