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 f or 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?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.