Programmable completion is a bash feature that does context sensitive tab completion, so it will only show files which the current command can accept. For example
unzip [tab]
will only complete zipped files. It also even knows how to tab complete "-" as an argument for most common commands. In case this seems like magic, it isn't, somebody painstakingly maintains a database of the valid arguments. These are all defined in /etc/bash_completion, all 9,000 lines of filename and argument specifications.

If programmable completion isn't already enabled, you can starting using by doing

shopt -s progcomp

But the problem is that sometimes it just isn't quite smart enough. I know what I'm doing, sometimes I really do want to open that random file in mplayer. Just because something ends in .part (thanks, firefox) doesn't mean it's out of bounds. So what to do when bash thinks it knows better than me?

  1. Avoid programmable completion for the current command.

    To get default tab completion press

    M-/
    instead of
    [tab]
    This completes filenames, which is what you want 90% of the time. To complete hostnames and usernames there are other key combinations, listed here

  2. I want out altogether.

    If you want to disable it forever put

    shopt -u progcomp
    in your .bashrc

  3. I am root and never want my users to suffer this inconvience.

    If it's enabled in /etc/profile, or /etc/bash.bashrc, then comment out the lines that look like:

    if [ -f /etc/bash_completion ]; then
    . /etc/bash_completion
    If it's not enabled in either of these places, then it could have been turned on in /etc/skel/.bashrc or /etc/skel/.bash_profile. Your users got a copy of each of these files when you made them an account. There isn't any easy way to turn it off.