I know there are a lot of tutorials on bash completion, but I just can't figure this out.
All I want is this. If I type myscript[tab][tab], then "myscript list-commands" is run. It will output a space delimited list of available commands (but I can output it however is appropriate). That output list is used for tab completion.
What do I put it my .bashrc to make that happen?