GNU bug report logs - #26661
compile, shell etc. should use bash-completion !

Previous Next

Package: emacs;

Reported by: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>

Date: Tue, 25 Apr 2017 23:38:02 UTC

Severity: wishlist

Full log


View this message in rfc822 format

From: Stefan Kangas <stefan <at> marxist.se>
To: Kévin Le Gouguec <kevin.legouguec <at> gmail.com>
Cc: 26661 <at> debbugs.gnu.org, 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Subject: bug#26661: compile, shell etc. should use bash-completion !
Date: Wed, 2 Sep 2020 18:34:00 -0400
Kévin Le Gouguec <kevin.legouguec <at> gmail.com> writes:

> Out of curiosity, couldn't shell-mode (and M-x compile et al.) do what
> python-mode does, i.e. ask the interpreter's "completion API" for
> candidates when the user hits TAB?
>
> I think that's what the "bash-completion" package from MELPA does[1];
> this approach would allow Emacs to leverage Bash's programmable
> completion with no special support for specific commands.
>
>
> (Apologies if I've misunderstood something, I've only very quickly
> glanced at python.el and bash-completion's internals.)
>
>
> [1] https://raw.githubusercontent.com/szermatt/emacs-bash-completion/master/bash-completion.el
>
> See e.g. bash-completion--setup-bash-common which runs "complete -p".

Interesting, I didn't know about that package.  I tested it, and it
seems to do the job.

I think it's interesting as an alternative, but is it suitable as a
default?  For example what happens if you don't have bash-completion
installed on your machine.  IIRC it is a separate package in Debian.

Also, I doubt that it could ever be as powerful as pcomplete.

My preference is that for this use-case we point users to use the
third-party package, but I guess YMMV.  Any other opinions?




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

Previous Next


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