Bash auto-completion question
So I noticed something odd the other day. My bash (Debian lenny) will autocomplete commands for me, as expected. However, for some commands, it will also autocomplete the options. For, example, if I type "dd ib" and then hit tab, it will complete to "dd ibs=".
How do these programs go about notifying bash of their options? Is there some method of pre-registering? Or are all of these commands actually bash builtins?