While typing in a terminal, tab completion is a huge time saver. Being able to auto-complete file names or commands is very nice, especially if you can’t quite remember what it is.
There are times, however, that this has become quite annoying for me as a developer. More than once a day when I really get in the zone and start hacking, I will accidentally hit tab when I have not yet input anything. While this doesn’t slow things down too much for me on a native Linux installation, it causes a huge delay when using Cygwin. Instead of just quickly asking me if I want display all the options, it appears to start to build the command list which has a delay of many seconds. This completely breaks my flow of programming.
I’m not entirely sure if it has to do with the number of possible auto-completes in my Cygwin installation or if it just is slower than a Linux installation but I didn’t want it anymore. I never find myself just hitting tab to get the list of every possibility; I am always auto-completing.
Having searched online before for a solution but never coming up with anything I just sort of accepted that my flow would be interrupted every once in a while by this silly behavior. Today, I ran into the issue multiple times and decided I had, had enough. I hopped into ##linux on Freenode.
There, I was delivered the option that would make my problem go away:
shopt -s no_empty_cmd_completion
Dropping this line in my ~/.bashrc file accompanied by a quick restart finally made my problem go away.
If you liked this post, then please consider following me on Twitter or subscribing to my feed.