shell-command-completion-function

shell-command-completion-function is a compiled Lisp function in `shell.el'.

(shell-command-completion-function)

Completion function for shell command names.
This is the value of `pcomplete-command-completion-function' for
Shell buffers. It implements `shell-completion-execonly' for
`pcomplete' completion.