pcomplete-command-name-function

pcomplete-command-name-function is a variable defined in `pcomplete.el'.
Its value is
pcomplete-command-name

  • This variable may be risky if used as a file-local variable.

Documentation:
Function called for determining the current command name.

You can customize this variable.