diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2020-09-27 22:07:14 -0400 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2020-09-27 22:07:14 -0400 |
commit | ba42f7932419c3c8b1e23f39c81a1a2dd1b3a154 (patch) | |
tree | 22b47a0136a040ce4edde8079e8efc3afe5ef3dd /lisp/pcmpl-unix.el | |
parent | 4155ca273ade47bc7e19fe4af1f41c4e764a59ba (diff) | |
download | emacs-ba42f7932419c3c8b1e23f39c81a1a2dd1b3a154.tar.gz |
Fix pcomplete completion of things like `xargs` and `sudo` (bug#16197)
* lisp/pcmpl-unix.el (pcomplete/xargs): Don't `pcomplete-this` around
`pcomplete-command-completion-function`.
(pcomplete/sudo): Make it an alias for `pcomplete/xargs`.
* lisp/shell.el (shell-command-completion-function): Return the
names from `exec-path` when the command name has no `/`.
Diffstat (limited to 'lisp/pcmpl-unix.el')
-rw-r--r-- | lisp/pcmpl-unix.el | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/pcmpl-unix.el b/lisp/pcmpl-unix.el index 74f45b95233..9d346cfbd22 100644 --- a/lisp/pcmpl-unix.el +++ b/lisp/pcmpl-unix.el @@ -82,10 +82,14 @@ being via `pcmpl-ssh-known-hosts-file'." ;;;###autoload (defun pcomplete/xargs () "Completion for `xargs'." - (pcomplete-here (funcall pcomplete-command-completion-function)) + ;; FIXME: Add completion of xargs-specific arguments. + (funcall pcomplete-command-completion-function) (funcall (or (pcomplete-find-completion-function (pcomplete-arg 1)) pcomplete-default-completion-function))) +;; FIXME: Add completion of sudo-specific arguments. +(defalias 'pcomplete/sudo #'pcomplete/xargs) + ;;;###autoload (defalias 'pcomplete/time 'pcomplete/xargs) |