Function: shell-dynamic-complete-command

shell-dynamic-complete-command is an interactive and byte-compiled function defined in shell.el.gz.

Signature

(shell-dynamic-complete-command)

Documentation

Dynamically complete the command at point.

This function is similar to comint-dynamic-complete-filename, except that it searches exec-path(var)/exec-path(fun) (minus trailing exec-directory) for completion candidates. Note that this may not be the same as the shell's idea of the path.

Completion is dependent on the value of shell-completion-execonly, shell-completion-fignore, plus those that affect file completion. See Info node (emacs)Shell Options.

Returns t if successful.

View in manual

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/shell.el.gz
(defun shell-dynamic-complete-command ()
  "Dynamically complete the command at point.
This function is similar to `comint-dynamic-complete-filename', except that it
searches `exec-path' (minus trailing `exec-directory') for completion
candidates.  Note that this may not be the same as the shell's idea of the
path.

Completion is dependent on the value of `shell-completion-execonly',
`shell-completion-fignore', plus those that affect file completion.  See Info
node `Shell Options'.

Returns t if successful."
  (interactive)
  (let ((data (shell-command-completion)))
    (if data
	(prog2 (unless (window-minibuffer-p)
		 (message "Completing command name..."))
            (completion-in-region (nth 0 data) (nth 1 data) (nth 2 data))))))