I want to customize bash completion on command names, such that matches are looked for in a particular list only.
If I try the following:
complete -E -W "foo bar"
it works fine on an empty line, but as soon as I type
b it falls back to standard command completion, i.e. looking for binaries in
$PATH and/or matching filenames.
How do I modify completion for command names?