An introduction to bash completion: part 2

179
Previously we showed how to add basic completion to commands, using facilities which were already provided by the bash completion routines. In this second part we’ll demonstrate how to add completely new custom completion to commands.

Link: Debian-Administration.org