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


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

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

> I'm also not exactly sure how integrating bash completion with Emacs
> would work.  Bash completion consists of a number of highly
> bash-specific scripts.  It would take significant effort to write an
> Emacs parser for them.
>
> It seems like a better idea for people to spend time on making pcomplete
> extensions for more commands.  But that would be outside the scope of
> this feature request, I think.

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".




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

Previous Next


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