+9  A: 

You have discovered Bash's programmable completion feature.

unwind
+5  A: 

See:

$ man bash

In particular, the section entitled "READLINE" and subsection "Programmable Completion"

Alnitak
+5  A: 

FYI: In Ubuntu and/or Debian the scripts are at /etc/bash_completion.d/