just add the following line in /etc/bash_completion complete -f -X '!*.chm' kchmviewer
I don't think I'll do this, since if I do it for this program, I'll be obligated to do it for every other package in the tree. Also, feel free to get the maintainers for kchmviewer to include a bash-completion script in their package. As you've shown, it'd be pretty trivial. I just don't think it needs to be in the system-wide bash-completion script.