In bash, how does autocompletion know the options to complete a command?
For example,
when I hit key Tab after
ls, it will list the files in the current directory.when I hit key Tab after
ebook-convertfrom calibre, it will list*.recipe.
Does the implementation of a program provide the handler of the Tab-hitting event?