A bash built-in command to generate command completions.
compgen
is a bash built-in command used to define automatic tab-completion behaviour for options, filenames and other positional arguments to shell commands.
It's intended to be used from within a shell function generating possible completions, which is then used by the complete
builtin to define a completion specification or compspec.