Tab completion for executable command is not working within interactive for loops in bash. I could have sworn it used to work, but I'm open to the idea that it's never worked and I'm going crazy. It works fine at the regular command line, not within loops. I keep finding myself ^Cing out of writing a loop to tab-complete the name so I can copy and paste it (the command names I'm actually not as trivial as 'whatis' I used in the example below).
$ which whatis /usr/bin/whatis $ wh<TAB>(BEEP)<TAB> whatis whereis while who wheel which whiptail whoami $ what<TAB>is usage: whatis keyword ... $ for i in foo bar ray > do > what<TAB>(BEEP)<TAB>(BEEP)
Environment is as follows:
$ bash --version GNU bash, version 4.1.2(1)-release (x86_64-redhat-linux-gnu)