A relatively new feature in bash is programmable completion, which
has been available since the beta version of 2.04. Programmable
completion will be familiar to you if you are a zsh user. It also
exists, albeit in a much less usable form, in tcsh.

Standard completion

bash has offered many forms of completion since its inception,
including path, file, user, host and variable completion.

    * Path-name completion
    * File-name completion
    * User-name completion
    * Host-name completion
    * Variable-name completion

Programmable completion indefinitely extends the type of completion
you can perform.

This package contains a variety of completions for various programs.

Homepage:
https://github.com/scop/bash-completion
