Bash Shell Hangs on ?+Tab-complete
- by michaelmichael
I often use tab completion in Bash when completing directories, but I find that it hangs for an unacceptable amount of time if I accidentally include a question mark in the directory. I'd like to know why and how to prevent it if possible. Here's the scenario:
I start a command and use the ~ key to represent home:
ls ~?Desktop/co
Oops! I held down the Shift for a split-second too long. I had intended for ? to be /. But (oh no!) muscle memory has already kicked in. I've hit the Tab before I noticed the mistake. Now I'm stuck waiting for the shell to beep angrily at me. Usually a minute or two.
What happened? Why did the question mark cause it to hang and eventually beep? Any way to stop it from hanging?