Function: shell-command-completion-function

shell-command-completion-function is a byte-compiled function defined in shell.el.gz.

Signature

(shell-command-completion-function)

Documentation

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.

Source Code

;; Defined in /usr/src/emacs/lisp/shell.el.gz
(defun 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."
  (if (pcomplete-match "/")
      (pcomplete-here (pcomplete-entries nil
					 (if shell-completion-execonly
					     #'file-executable-p)))
    (pcomplete-here
     (nth 2 (shell--command-completion-data)))))