Bash Shell Hangs on ?+Tab-complete

Posted by michaelmichael on Super User See other posts from Super User or by michaelmichael
Published on 2012-06-14T17:46:20Z Indexed on 2012/06/15 15:19 UTC
Read the original article Hit count: 358

Filed under:
|
|
|

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?

© Super User or respective owner

Related posts about osx

Related posts about bash