You have discovered Bash's programmable completion feature.
unwind
2009-04-22 07:51:07
See:
$ man bash
In particular, the section entitled "READLINE" and subsection "Programmable Completion"