GNU bug report logs - #16197
24.3.50; no completion on commands following "sudo" in shell and eshell

Previous Next

Package: emacs;

Reported by: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>

Date: Fri, 20 Dec 2013 08:20:01 UTC

Severity: minor

Tags: fixed, patch

Found in version 24.3.50

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #29 received at 16197 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
Cc: 16197 <at> debbugs.gnu.org
Subject: Re: bug#16197: 24.3.50;
 no completion on commands following "sudo" in shell and eshell
Date: Sat, 04 Jan 2014 15:26:59 -0500
> Don't know what */rsh does, but */xargs is actually not working.

Aha!

> Well I didn't read */xargs, but here are the problems:

> - `pcomplete-command-name' actually is always returning the first arg of
>   command line e.g for "sudo apt-get" it is returning "sudo".

> - `shell-command-completion' is trying to complete after what
>   `shell-backward-command' returns, which is actually the first command
>   near prompt or "[&;|]+ ", so when you try to complete after sudo or
>   xargs, you call the completion against "sudo" or "xargs" which returns
>   nothing of course.

Can you describe those problems in terms of user-visible behavior
(i.e. a recipe) so I can better understand what the code does (and
should do instead)?

> Actually the fix made to these two functions is affecting only sudo, but
> I can easily fix it to handle also 'xargs'.

That would be nice.

> Don't think so, I think the problem should be fixed at another level as
> descripted above.

I missed the description, I'm afraid.

> https://github.com/thierryvolpiatto/emacs-tv-config/blob/master/pcomplete-extension.el

Not sure what I should look at there.

Can you send it as a patch against pcmpl-unix.el to fix pcomplete/xargs
(and add pcomplete/sudo at the same time)?


        Stefan




This bug report was last modified 4 years and 238 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.