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

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: wishlist; Reported by: 積丹尼 Dan Jacobson <jidanni@HIDDEN>; dated Tue, 25 Apr 2017 23:38:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Removed tag(s) wontfix and notabug. Request was from Stefan Kangas <stefan@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Did not alter fixed versions and reopened. Request was from Debbugs Internal Request <help-debbugs@HIDDEN> to internal_control <at> debbugs.gnu.org. Full text available.

Message received at 26661 <at> debbugs.gnu.org:


Received: (at 26661) by debbugs.gnu.org; 4 Sep 2020 13:28:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Sep 04 09:28:58 2020
Received: from localhost ([127.0.0.1]:38008 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kEBly-0003Mj-7J
	for submit <at> debbugs.gnu.org; Fri, 04 Sep 2020 09:28:58 -0400
Received: from mail-ej1-f68.google.com ([209.85.218.68]:37405)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <stefankangas@HIDDEN>) id 1kEBlw-0003MP-Jw
 for 26661 <at> debbugs.gnu.org; Fri, 04 Sep 2020 09:28:56 -0400
Received: by mail-ej1-f68.google.com with SMTP id nw23so8612652ejb.4
 for <26661 <at> debbugs.gnu.org>; Fri, 04 Sep 2020 06:28:56 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:in-reply-to:references:mime-version:date
 :message-id:subject:to:cc:content-transfer-encoding;
 bh=7xw4TN226XdwxIhS471f05RShovoJgyOTHLzKcX58Bo=;
 b=cwzJM85jf9F7Ds0qGplO75fu0Ysz86mK9u7CGL2E7x0t7tVwZo5JRnAurp9FXmoiqY
 5DuGUctV4AWCygfRFM/zksqMlOARECS8zgm8BnyHtoxV3GVtJAGjALfIfo96Oiq2c+jU
 lPuXMOdm/+vuQysJxv6giBOfZntmwPNuQtggRyaU2sVNmvgTe30NHmHpXVHTON6nY5Sa
 ayfsbRny5aqhQuZwISmRV2djBHPXtl243piVZpKJn9do8Ge1yI7B5wbXsxstYESrXTpB
 KZmXtynfFviOxwIgCsa7QXxgGqZenQedaQVyj6qOYgmQlJ5Yq+xo7S6SZ64yHUqZlPm4
 jQMw==
X-Gm-Message-State: AOAM533e5BdzRbzEpBSbDobhssN0H54X6dePKrF0zP4Oxi90KT5vQw3w
 tO3PeWEbpjP4N2SVJDfuRSJEIUfr7u2ZIlNEpqE=
X-Google-Smtp-Source: ABdhPJyVxwdzarg052wgF65sdoYhatfdupbraeqtSqKkD3KAnZOnR7YZVXtdpT813W5925gwmRC6yeIu1xe1tF+n1gQ=
X-Received: by 2002:a17:906:a88a:: with SMTP id
 ha10mr7867479ejb.532.1599226130873; 
 Fri, 04 Sep 2020 06:28:50 -0700 (PDT)
Received: from 753933720722 named unknown by gmailapi.google.com with
 HTTPREST; Fri, 4 Sep 2020 13:28:49 +0000
From: Stefan Kangas <stefan@HIDDEN>
In-Reply-To: <87k0x9by4d.fsf@HIDDEN>
References: <878tmoxdno.fsf@HIDDEN>
 <CADwFkmnsAOt9R95PSjdegD-soAzfvVap13niwiiw4kRNnNK3SA@HIDDEN>
 <87h7sf6d9m.fsf@HIDDEN>
 <CADwFkmnyitDKyhQo0XLRmG1jZ8eU=rJHJa+K1UbGAVq3QGJEtQ@HIDDEN>
 <87k0x9by4d.fsf@HIDDEN>
MIME-Version: 1.0
Date: Fri, 4 Sep 2020 13:28:49 +0000
Message-ID: <CADwFkmmQCP0Am2ypyXJDcRe30_3EQUzxU9xrPzjvLsEryQKMdw@HIDDEN>
Subject: Re: bug#26661: compile, shell etc. should use bash-completion !
To: =?UTF-8?Q?K=C3=A9vin_Le_Gouguec?= <kevin.legouguec@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.3 (/)
X-Debbugs-Envelope-To: 26661
Cc: 26661 <at> debbugs.gnu.org,
 =?UTF-8?B?56mN5Li55bC8IERhbiBKYWNvYnNvbg==?= <jidanni@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

reopen 26661
tags 26661 - notabug wontfix
thanks

K=C3=A9vin Le Gouguec <kevin.legouguec@HIDDEN> writes:

> Lots of authors of CLI tools now maintain their own completion
> configuration for e.g. Bash and/or Zsh, so by supporting Bash's native
> completion facilities we would leverage their efforts instead of
> re-developing ad-hoc completion functions.
[...]
> I just think the benefit/cost ratio of enabling native Bash
> completions by default seems high.

OK, those are indeed compelling arguments, so I'm re-opening the bug
report.

Maybe we could convince the authors of the bash-completion package to
assign their copyright to the FSF.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#26661; Package emacs. Full text available.

Message received at 26661 <at> debbugs.gnu.org:


Received: (at 26661) by debbugs.gnu.org; 4 Sep 2020 11:05:49 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Sep 04 07:05:49 2020
Received: from localhost ([127.0.0.1]:37582 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kE9XQ-0003aW-Q1
	for submit <at> debbugs.gnu.org; Fri, 04 Sep 2020 07:05:49 -0400
Received: from mail-wm1-f65.google.com ([209.85.128.65]:51521)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <kevin.legouguec@HIDDEN>) id 1kE9XO-0003aI-Bs
 for 26661 <at> debbugs.gnu.org; Fri, 04 Sep 2020 07:05:46 -0400
Received: by mail-wm1-f65.google.com with SMTP id w2so5703574wmi.1
 for <26661 <at> debbugs.gnu.org>; Fri, 04 Sep 2020 04:05:46 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version;
 bh=zz3JPA4x4LBZwKiAOsCjq+A8A4IiRPS1XFKNFdbmxSw=;
 b=YBNcHiL/uuBM9cQGAAOlW2/Lc3FS/qp2ywXg7Weh/pGI+QpbE+0ccJhrm/bMfJYTke
 uTQuC2ql15NpjJCCGG8ytGUz/zFjCyCzDV6xF3ReophOoC2iBi03UB01y2Vf1/j6lYbc
 PGeTTRIDF9ixhGEDJ1Mfe3lvXQFeKlwZ5tZw31t7cWj0LWyC5pyax46+nADgr/3rB02K
 HvZw5LAL1hWN9LEgdbJB0vN7GPo56zRgNYOTq9pbieJeE+6CmDavC6h36szqq+89mbHd
 w9OP/PSo3z0k0ffvbXEzQymqj2VI4T4Jth42QE50e6bjQi6e5+6hYgoyMmmPcq3RbI1g
 Vp1g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
 :message-id:user-agent:mime-version;
 bh=zz3JPA4x4LBZwKiAOsCjq+A8A4IiRPS1XFKNFdbmxSw=;
 b=Q96CnxPNy/L26sdRCP9rW8HXvqJely5J4grKofViic1Chvbn5bGQADLCXMqR8IQ+u6
 Ixls6lJr6WlHDMB17zgjpwLpu8Ke6OBOWXrieDjFC8klK2TGr4INFLYIy2qhBUHiBQwY
 MK/GZkOg/pKbwl3ikHXm6kRiHFgZBY9LqzH8b0hudDYNYXy9HWkqFyPLe2BhJvo9LKzu
 +1ygUTJBhZVdXtlVLBtpnlQA2g58ZRTnPcvnggO2qDTcb0dVKlmlt61YEXuvL+/jkat7
 V2HkVpEEwIwVpofbN3v3goch7wGI+LayDg+Zgv3FSPOQKfMwWztsCnXQgpIJW+y8iw+o
 3m9g==
X-Gm-Message-State: AOAM53154+1H0wnUXLxShGKzv4lDeKgcqSMnu9fPkBqsUHP2BQ6R7QvL
 m37lQRCQfo4Nk01yzFnRslTw9J8lKxY=
X-Google-Smtp-Source: ABdhPJw3lsGNGlB6lnnsf/0epWYbkWSWbqsePnnMWsDwdR6Ob2bwQfRHjK3AERYcfe1Yml4llwc8RA==
X-Received: by 2002:a1c:a746:: with SMTP id q67mr7460909wme.128.1599217540219; 
 Fri, 04 Sep 2020 04:05:40 -0700 (PDT)
Received: from hirondell ([2a01:e0a:20e:d340:41b7:7b2e:4aab:4832])
 by smtp.gmail.com with ESMTPSA id b84sm12838042wmd.0.2020.09.04.04.05.38
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Fri, 04 Sep 2020 04:05:39 -0700 (PDT)
From: =?utf-8?Q?K=C3=A9vin_Le_Gouguec?= <kevin.legouguec@HIDDEN>
To: Stefan Kangas <stefan@HIDDEN>
Subject: Re: bug#26661: compile, shell etc. should use bash-completion !
References: <878tmoxdno.fsf@HIDDEN>
 <CADwFkmnsAOt9R95PSjdegD-soAzfvVap13niwiiw4kRNnNK3SA@HIDDEN>
 <87h7sf6d9m.fsf@HIDDEN>
 <CADwFkmnyitDKyhQo0XLRmG1jZ8eU=rJHJa+K1UbGAVq3QGJEtQ@HIDDEN>
Date: Fri, 04 Sep 2020 13:05:38 +0200
In-Reply-To: <CADwFkmnyitDKyhQo0XLRmG1jZ8eU=rJHJa+K1UbGAVq3QGJEtQ@HIDDEN>
 (Stefan Kangas's message of "Wed, 2 Sep 2020 18:34:00 -0400")
Message-ID: <87k0x9by4d.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 26661
Cc: 26661 <at> debbugs.gnu.org,
 =?utf-8?B?56mN5Li55bC8?= Dan Jacobson <jidanni@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Stefan Kangas <stefan@HIDDEN> writes:

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

IIUC Debian's bash-completion package merely provides configuration for
Bash's native completion facilities (`complete' is just a Bash builtin);
I expect that if it's not installed, the MELPA package will just end up
with an empty list of completion candidates.

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

It would probably have better program coverage though.  Lots of authors
of CLI tools now maintain their own completion configuration for
e.g. Bash and/or Zsh, so by supporting Bash's native completion
facilities we would leverage their efforts instead of re-developing
ad-hoc completion functions.

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

All I can say is that I enjoy python.el offering the interpreter's
native completions, and I wish shell-mode et al. could work the same
way.  Philosophically speaking, it would make sense IMO for one GNU
project (Emacs) to leverage the API offered by another GNU project
(Bash).


I'm not saying pcomplete doesn't deserve some love and we could not
implement smarter completions with it; I just think the benefit/cost
ratio of enabling native Bash completions by default seems high.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#26661; Package emacs. Full text available.

Message received at 26661 <at> debbugs.gnu.org:


Received: (at 26661) by debbugs.gnu.org; 2 Sep 2020 22:34:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Sep 02 18:34:08 2020
Received: from localhost ([127.0.0.1]:32793 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kDbKS-0007rt-6P
	for submit <at> debbugs.gnu.org; Wed, 02 Sep 2020 18:34:08 -0400
Received: from mail-ed1-f68.google.com ([209.85.208.68]:37259)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <stefankangas@HIDDEN>) id 1kDbKQ-0007rU-T3
 for 26661 <at> debbugs.gnu.org; Wed, 02 Sep 2020 18:34:07 -0400
Received: by mail-ed1-f68.google.com with SMTP id n22so625400edt.4
 for <26661 <at> debbugs.gnu.org>; Wed, 02 Sep 2020 15:34:06 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:in-reply-to:references:mime-version:date
 :message-id:subject:to:cc:content-transfer-encoding;
 bh=YcSerjk3nWw9m5Sn8rWgc3kB6o+D3mZHxz8UEvefqX0=;
 b=L9C4GR5IHp7z1HGtGM3JhWKod4gI9OhFUEnCWaCFnXuNgFPi01K2maAD8EiWBV8w0a
 Hmz9VjdscPaArIEMFwZAgI2r9ejKyPzzGkvj/oro7hxUlxcq6IVeD+bsxXqdvvM9EYO2
 z08MzihLeLYOznZ6ANt7R2tZWDWunu0N1u2WPqg66bqLVBb+PyqhiGY3Red7fPHLMgv/
 2t4DUmFFgRosm7tPOzuE5W9Lll+mVGauderC+uaiVovd05kNkfh6lh9Z2EEdsLcN2QYy
 FLB2ksz8hA0Gq89wVpdfO1XG8lvwkF4TXnrfBjElLhmKVhXXKly7qNiI9l3os3WfvicR
 m8FA==
X-Gm-Message-State: AOAM531IhvYysjXageS2qlnRzyr9z+7usy6uewr7+EmjiEckqXTmBB8o
 QIFFFuopVAfGCTTqr3CtxU1aSzA08mpSuvD4gAQ=
X-Google-Smtp-Source: ABdhPJxpIuaPLS2x31ZH1Ei1JSZd8jbDAEcSi1cKR8PM+P7bF8M8ctI5pYXh69ap0dDbwWZ9AYfsHUv/Aa0/kkCqbUs=
X-Received: by 2002:aa7:c0d5:: with SMTP id j21mr55402edp.259.1599086041011;
 Wed, 02 Sep 2020 15:34:01 -0700 (PDT)
Received: from 753933720722 named unknown by gmailapi.google.com with
 HTTPREST; Wed, 2 Sep 2020 18:34:00 -0400
From: Stefan Kangas <stefan@HIDDEN>
In-Reply-To: <87h7sf6d9m.fsf@HIDDEN>
References: <878tmoxdno.fsf@HIDDEN>
 <CADwFkmnsAOt9R95PSjdegD-soAzfvVap13niwiiw4kRNnNK3SA@HIDDEN>
 <87h7sf6d9m.fsf@HIDDEN>
MIME-Version: 1.0
Date: Wed, 2 Sep 2020 18:34:00 -0400
Message-ID: <CADwFkmnyitDKyhQo0XLRmG1jZ8eU=rJHJa+K1UbGAVq3QGJEtQ@HIDDEN>
Subject: Re: bug#26661: compile, shell etc. should use bash-completion !
To: =?UTF-8?Q?K=C3=A9vin_Le_Gouguec?= <kevin.legouguec@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.3 (/)
X-Debbugs-Envelope-To: 26661
Cc: 26661 <at> debbugs.gnu.org,
 =?UTF-8?B?56mN5Li55bC8IERhbiBKYWNvYnNvbg==?= <jidanni@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

K=C3=A9vin Le Gouguec <kevin.legouguec@HIDDEN> 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/mast=
er/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?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#26661; Package emacs. Full text available.

Message received at 26661 <at> debbugs.gnu.org:


Received: (at 26661) by debbugs.gnu.org; 2 Sep 2020 22:10:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Sep 02 18:10:41 2020
Received: from localhost ([127.0.0.1]:60993 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kDaxk-0007Hx-Qx
	for submit <at> debbugs.gnu.org; Wed, 02 Sep 2020 18:10:41 -0400
Received: from mail-wm1-f44.google.com ([209.85.128.44]:54930)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <kevin.legouguec@HIDDEN>) id 1kDaxh-0007Hh-Aw
 for 26661 <at> debbugs.gnu.org; Wed, 02 Sep 2020 18:10:39 -0400
Received: by mail-wm1-f44.google.com with SMTP id s13so844472wmh.4
 for <26661 <at> debbugs.gnu.org>; Wed, 02 Sep 2020 15:10:37 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version;
 bh=L1QMfHSk1cUTezj/b3jUR5FxwYPxdYt+BznkFuOhgGQ=;
 b=uQUi376gkqFyG6xSqfMRXpyyuotfEiBu0KTvP9GremQvgWmDu0JiPR5q77wumUgHvq
 gDnL0ECwrzDAl+3XkRygx+XdC8x2Jp/ecvN3Fk7iN9swn0pawNaNwGbu4a8fIZ1Nnksi
 Vz9xrd69MUBu4pApYDrzve9KvC+MaOUai1dvkaLEjuYdYH+z3ZsjxKd0ILjMimbLCMMd
 JtpkTcX88eyFiQbah2PzS7rquVmACBSjNXDFNoTWfgcx78ucaWb2GPtvj+su/qXL7XyL
 PtNXlYGwXUWRjNDpvhy4jSSDkcyaNc8aV8InKayqgFs37Fdu1oxnS/W9fPCGxKIaPaYL
 EJdQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
 :message-id:user-agent:mime-version;
 bh=L1QMfHSk1cUTezj/b3jUR5FxwYPxdYt+BznkFuOhgGQ=;
 b=lcHjUjlfRi5A4AgrLptcOtkp5ZY6x3qQjNcBWwkCHPWQTmyOHhU8Enmp6fYw6v0gb9
 yMYN1fuubAF6NQWU2VZvJEQ42RPsUJlthYhso8X2s3aTPAutz66HHsDb5WqO00Q1YKYz
 hEs2++dHxML8Zd299rCwhLhGI58uvR3LjTSS8rgeIXNjkerwh9ZKAVK78e8fiKpk8gkj
 jIBmk+ySnFao5UXHGoLpSPP/BcjqdQ3xRuwSyeEHRRz9bY1VoGz406+S6UgRNeEwhXaK
 i/T9VG1NcYTgtruFmorAVJBuHEt+OrVBEqwWYW9QetjVIKXmoPT5sNzP5qBqA0mtDU5j
 D1uQ==
X-Gm-Message-State: AOAM533aZi1mKmzegHAsRAGvGD4P7xEcngR7fhtQ2RR6qXlXIPV3I7lc
 VaKDmKUBfwNZJmzgt6FG3XoJEuI178+GQQ==
X-Google-Smtp-Source: ABdhPJyDsL8fo5olvYmMMMLZcaokSPhC4Clttw+aAFSpcFnUPklQwpqVMqAqTY3LXeAK8qbIKjMn+A==
X-Received: by 2002:a7b:c2aa:: with SMTP id c10mr243938wmk.86.1599084631088;
 Wed, 02 Sep 2020 15:10:31 -0700 (PDT)
Received: from my-little-tumbleweed (200.143.13.109.rev.sfr.net.
 [109.13.143.200])
 by smtp.gmail.com with ESMTPSA id m3sm1439977wmb.26.2020.09.02.15.10.30
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Wed, 02 Sep 2020 15:10:30 -0700 (PDT)
From: =?utf-8?Q?K=C3=A9vin_Le_Gouguec?= <kevin.legouguec@HIDDEN>
To: Stefan Kangas <stefan@HIDDEN>
Subject: Re: bug#26661: compile, shell etc. should use bash-completion !
References: <878tmoxdno.fsf@HIDDEN>
 <CADwFkmnsAOt9R95PSjdegD-soAzfvVap13niwiiw4kRNnNK3SA@HIDDEN>
Date: Thu, 03 Sep 2020 00:10:29 +0200
In-Reply-To: <CADwFkmnsAOt9R95PSjdegD-soAzfvVap13niwiiw4kRNnNK3SA@HIDDEN>
 (Stefan Kangas's message of "Tue, 1 Sep 2020 16:14:57 -0700")
Message-ID: <87h7sf6d9m.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 26661
Cc: 26661 <at> debbugs.gnu.org,
 =?utf-8?B?56mN5Li55bC8?= Dan Jacobson <jidanni@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Stefan Kangas <stefan@HIDDEN> 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".




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#26661; Package emacs. Full text available.
bug closed, send any further explanations to 26661 <at> debbugs.gnu.org and 積丹尼 Dan Jacobson <jidanni@HIDDEN> Request was from Stefan Kangas <stefan@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Added tag(s) notabug and wontfix. Request was from Stefan Kangas <stefan@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 26661 <at> debbugs.gnu.org:


Received: (at 26661) by debbugs.gnu.org; 1 Sep 2020 23:15:07 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 01 19:15:07 2020
Received: from localhost ([127.0.0.1]:57624 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kDFUZ-0000KY-0T
	for submit <at> debbugs.gnu.org; Tue, 01 Sep 2020 19:15:07 -0400
Received: from mail-ej1-f68.google.com ([209.85.218.68]:40116)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <stefankangas@HIDDEN>) id 1kDFUV-0000Jb-VF
 for 26661 <at> debbugs.gnu.org; Tue, 01 Sep 2020 19:15:05 -0400
Received: by mail-ej1-f68.google.com with SMTP id z22so3987569ejl.7
 for <26661 <at> debbugs.gnu.org>; Tue, 01 Sep 2020 16:15:03 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:in-reply-to:references:user-agent
 :mime-version:date:message-id:subject:to:cc
 :content-transfer-encoding;
 bh=ou8P0OzucjbS8xDE3/yImblnux6daC7rhNzkl9/hU4E=;
 b=EIA4zzSeZhPZzqmYg2S1sA9j7R4w/CES9OGf3C7rbiwyaBCZHsjlwXRZtcgT150LFe
 7lKawQRebNfM7gaaKZDa6fQTR9cea0cLsPe1LMpEJ+iL7ktlvfONTGTfJ9IASFvZhbFt
 krMTIq91niDHq/owFg+DlvpzCdQzZ0i6j7bsWmEDj7tplWJM84SBOHf+qV33OMfg/OxN
 IoM/p/RjCjd3CiMFLZ0lmgClpkgKeu/b7Swzc+RyyiuTtax0IFieto1qCR6tE/ujWlCt
 KWL0QqvcWoMOjxxxiJDXnMtKVhrPFFJ+OYqenWdpVBE6XXtOjRF6ZpnDPkV00Ve9+04C
 08WA==
X-Gm-Message-State: AOAM5300BqtEX5jn7+idkyz+oWTxgp8Cl8Ex31K0/vwMmso9J1QorrCF
 XwTUh6Z2obHSvbafOTY2EgIgbCys72iPvQ+fb0k=
X-Google-Smtp-Source: ABdhPJxyVrVzZoPYyl4nzz1o880w08rTkje+RTzJB3H8KZ4AbFYkDnCPTkFCIg71yP++l7wOaqxWARQ/XLD5CfH7zeE=
X-Received: by 2002:a17:906:bc52:: with SMTP id
 s18mr3488226ejv.398.1599002097993; 
 Tue, 01 Sep 2020 16:14:57 -0700 (PDT)
Received: from 753933720722 named unknown by gmailapi.google.com with
 HTTPREST; Tue, 1 Sep 2020 16:14:57 -0700
From: Stefan Kangas <stefan@HIDDEN>
In-Reply-To: =?UTF-8?B?PDg3OHRtb3hkbm8uZnNmQGppZGFubmkub3JnPiAoIuepjeS4ueWwvCBEYW4gSmFj?=
 =?UTF-8?B?b2Jzb24iJ3MgbWVzc2FnZSBvZiAiV2VkLCAyNiBBcHIgMjAxNyAwNzozNjo1OSArMDgwMCIp?=
References: <878tmoxdno.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Date: Tue, 1 Sep 2020 16:14:57 -0700
Message-ID: <CADwFkmnsAOt9R95PSjdegD-soAzfvVap13niwiiw4kRNnNK3SA@HIDDEN>
Subject: Re: bug#26661: compile, shell etc. should use bash-completion !
To: =?UTF-8?B?56mN5Li55bC8IERhbiBKYWNvYnNvbg==?= <jidanni@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.3 (/)
X-Debbugs-Envelope-To: 26661
Cc: 26661 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

tags 26661 + notabug wontfix
close 26661
thanks

=E7=A9=8D=E4=B8=B9=E5=B0=BC Dan Jacobson <jidanni@HIDDEN> writes:

> M-x compile prompt,
> Compile command: cat --<TAB>
>
> M-x shell,
> $ cat --<TAB>
>
> etc. etc.
> should all use bash-completion !
>
> If the user has it turned on in his shell, emacs should recognize it.
> https://www.google.com/search?q=3Dbash-completion+emacs

Note that `shell' already supports pcomplete, which extends to
`compile' (and `shell-command', etc.) AFAICT.  Try typing:

    M-x compile RET make SPC TAB

and enjoy...

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.

I'm therefore closing this bug report.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#26661; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 25 Apr 2017 23:37:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 25 19:37:19 2017
Received: from localhost ([127.0.0.1]:40252 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1d3A1H-00036u-3N
	for submit <at> debbugs.gnu.org; Tue, 25 Apr 2017 19:37:19 -0400
Received: from eggs.gnu.org ([208.118.235.92]:33388)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <jidanni@HIDDEN>) id 1d3A1F-00036h-SL
 for submit <at> debbugs.gnu.org; Tue, 25 Apr 2017 19:37:18 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <jidanni@HIDDEN>) id 1d3A19-0007dn-Rb
 for submit <at> debbugs.gnu.org; Tue, 25 Apr 2017 19:37:12 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_DKIM_INVALID
 autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:49286)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <jidanni@HIDDEN>) id 1d3A19-0007dh-Nm
 for submit <at> debbugs.gnu.org; Tue, 25 Apr 2017 19:37:11 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:52582)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <jidanni@HIDDEN>) id 1d3A18-0005Y9-LM
 for bug-gnu-emacs@HIDDEN; Tue, 25 Apr 2017 19:37:11 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <jidanni@HIDDEN>) id 1d3A15-0007Zw-Im
 for bug-gnu-emacs@HIDDEN; Tue, 25 Apr 2017 19:37:10 -0400
Received: from homie.mail.dreamhost.com ([208.97.132.208]:52295
 helo=homiemail-a2.g.dreamhost.com)
 by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <jidanni@HIDDEN>) id 1d3A15-0007XN-AR
 for bug-gnu-emacs@HIDDEN; Tue, 25 Apr 2017 19:37:07 -0400
Received: from homiemail-a2.g.dreamhost.com (localhost [127.0.0.1])
 by homiemail-a2.g.dreamhost.com (Postfix) with ESMTP id C133F280069
 for <bug-gnu-emacs@HIDDEN>; Tue, 25 Apr 2017 16:37:02 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=jidanni.org; h=from:to
 :subject:date:message-id:mime-version:content-type; s=
 jidanni.org; bh=ktP8Sray3vCedWs1DgiuRKqAHiI=; b=m/nesYC9FLXz4Boz
 FFqNesHRM1gUYWuFGvtchzIt0LPJd6bOS5VkSdq5QQjiQ1MQIoyExvhXNGrNQ4BR
 nVktPuPiuVVHT8vjL+LEfuRwkpEdP1nuHqvPjIfU2v3Fd8LxDdw80LQkxXP3Ajvk
 y5C60vuMQjAjTuUPtViJ2WAgfPs=
Received: from jidanni.org (114-41-5-216.dynamic-ip.hinet.net [114.41.5.216])
 (using TLSv1 with cipher AES256-SHA (256/256 bits))
 (No client certificate requested)
 (Authenticated sender: jidanni@HIDDEN)
 by homiemail-a2.g.dreamhost.com (Postfix) with ESMTPSA id 8E0D3280063
 for <bug-gnu-emacs@HIDDEN>; Tue, 25 Apr 2017 16:37:02 -0700 (PDT)
From: =?utf-8?B?56mN5Li55bC8?= Dan Jacobson <jidanni@HIDDEN>
To: bug-gnu-emacs <bug-gnu-emacs@HIDDEN>
Subject: compile, shell etc. should use bash-completion !
Date: Wed, 26 Apr 2017 07:36:59 +0800
Message-ID: <878tmoxdno.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x [fuzzy]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

M-x compile prompt,
Compile command: cat --<TAB>

M-x shell,
$ cat --<TAB>

etc. etc.
should all use bash-completion !

If the user has it turned on in his shell, emacs should recognize it.
https://www.google.com/search?q=bash-completion+emacs




Acknowledgement sent to 積丹尼 Dan Jacobson <jidanni@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#26661; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 4 Sep 2020 13:30:05 UTC

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