From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thierry Volpiatto Newsgroups: gmane.emacs.devel Subject: No completion after sudo in (e)shell Date: Fri, 14 Dec 2012 19:58:49 +0100 Organization: Emacs Helm Message-ID: <87wqwk8npy.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1355511555 8186 80.91.229.3 (14 Dec 2012 18:59:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 14 Dec 2012 18:59:15 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Dec 14 19:59:30 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TjaTk-0007s6-NL for ged-emacs-devel@m.gmane.org; Fri, 14 Dec 2012 19:59:24 +0100 Original-Received: from localhost ([::1]:38569 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TjaTX-0007cE-Rr for ged-emacs-devel@m.gmane.org; Fri, 14 Dec 2012 13:59:11 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:59338) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TjaTV-0007Vf-7K for emacs-devel@gnu.org; Fri, 14 Dec 2012 13:59:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TjaTU-0003hL-98 for emacs-devel@gnu.org; Fri, 14 Dec 2012 13:59:09 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:60645) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TjaTU-0003hB-31 for emacs-devel@gnu.org; Fri, 14 Dec 2012 13:59:08 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1TjaTd-0007ho-RY for emacs-devel@gnu.org; Fri, 14 Dec 2012 19:59:17 +0100 Original-Received: from lbe83-2-78-243-104-167.fbx.proxad.net ([78.243.104.167]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 14 Dec 2012 19:59:17 +0100 Original-Received: from thierry.volpiatto by lbe83-2-78-243-104-167.fbx.proxad.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 14 Dec 2012 19:59:17 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 26 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: lbe83-2-78-243-104-167.fbx.proxad.net User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.2.90 (gnu/linux) Cancel-Lock: sha1:6HpKy7B3eA0ZNJ84U8Lbx9eeX0g= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:155561 Archived-At: emacs -Q M-x eshell apt- completion for apt commands popup *sudo apt- nothing Same in M-x shell Adding a pcomplete/sudo function fix this (At least in eshell, I don't use shell). --8<---------------cut here---------------start------------->8--- (defun pcomplete/sudo () (let ((prec (pcomplete-arg 'last -1))) (cond ((string= "sudo" prec) (while (pcomplete-here* (funcall pcomplete-command-completion-function) (pcomplete-arg 'last) t)))))) --8<---------------cut here---------------end--------------->8--- Not a bug just something missing. -- Thierry Get my Gnupg key: gpg --keyserver pgp.mit.edu --recv-keys 59F29997