As per my comments above, I've answered my own question!
After doing "complete -p | grep time"
, we can see how that command does it - you just need to define a completion rule as follows:
complete -o filenames -F _command mything
and put it into an otherwise empty a file called /etc/bash_completion.d/mything
. When you open a new bash terminal, you should then find that your mything
command can complete any subcommands in the normal manner.