From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#26661: compile, shell etc. should use bash-completion ! Date: Wed, 2 Sep 2020 18:34:00 -0400 Message-ID: References: <878tmoxdno.fsf@jidanni.org> <87h7sf6d9m.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8319"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 26661@debbugs.gnu.org, =?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson To: =?UTF-8?Q?K=C3=A9vin?= Le Gouguec Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Sep 03 00:35:11 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kDbLS-00023y-ER for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 03 Sep 2020 00:35:10 +0200 Original-Received: from localhost ([::1]:34336 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kDbLR-0007W2-Fo for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 02 Sep 2020 18:35:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33024) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kDbLK-0007U1-A2 for bug-gnu-emacs@gnu.org; Wed, 02 Sep 2020 18:35:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49483) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kDbLJ-0007DI-WE for bug-gnu-emacs@gnu.org; Wed, 02 Sep 2020 18:35:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kDbLJ-0007tF-SP for bug-gnu-emacs@gnu.org; Wed, 02 Sep 2020 18:35:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 02 Sep 2020 22:35:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 26661 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug wontfix Original-Received: via spool by 26661-submit@debbugs.gnu.org id=B26661.159908604830254 (code B ref 26661); Wed, 02 Sep 2020 22:35:01 +0000 Original-Received: (at 26661) by debbugs.gnu.org; 2 Sep 2020 22:34:08 +0000 Original-Received: from localhost ([127.0.0.1]:32793 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kDbKS-0007rt-6P for submit@debbugs.gnu.org; Wed, 02 Sep 2020 18:34:08 -0400 Original-Received: from mail-ed1-f68.google.com ([209.85.208.68]:37259) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kDbKQ-0007rU-T3 for 26661@debbugs.gnu.org; Wed, 02 Sep 2020 18:34:07 -0400 Original-Received: by mail-ed1-f68.google.com with SMTP id n22so625400edt.4 for <26661@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) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Wed, 2 Sep 2020 18:34:00 -0400 In-Reply-To: <87h7sf6d9m.fsf@gmail.com> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:186970 Archived-At: K=C3=A9vin Le Gouguec 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?