Bash programmable completion when typing “first command”
问题 Is there a way how to control completion for first command being typed on bash4 command prompt? I can control completions for "empty line" with complete -E, but as soon as some characters are typed, bash (or possibly readline) gives me all filenames from PATH, builtin commands (if, then, else...) and functions on completion attempt (TAB). I was able to avoid PATH entries by unsetting PATH in PROMPT_COMMAND and restoring it by binding function to trap DEBUG, but no luck with getting rid of