[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#16197: 24.3.50; no completion on commands following "sudo" in shell
From: |
Thierry Volpiatto |
Subject: |
bug#16197: 24.3.50; no completion on commands following "sudo" in shell and eshell |
Date: |
Tue, 07 Jan 2014 16:26:32 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
After applying the patch on previous mail, that among other things fix:
[...] | xargs <completion>
but not
[...] | xargs -<arg> <completion>
This definition of pcomplete/xargs fix it:
--8<---------------cut here---------------start------------->8---
(defun pcomplete/xargs ()
"Completion for `xargs'."
(let ((pcomplete-cmd-name (pcomplete-command-name)))
(cond ((string= "xargs" pcomplete-cmd-name)
(while (pcomplete-here*
(funcall pcomplete-command-completion-function)
(pcomplete-arg 'last) t)))
(t (funcall (or (pcomplete-find-completion-function (pcomplete-arg 1))
pcomplete-default-completion-function))))))
--8<---------------cut here---------------end--------------->8---
Note that there is no completion on the args, but that could be done
later (no urge for this).
--
Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997