From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Peter Seibel Newsgroups: gmane.emacs.bugs Subject: bug#75336: [PATCH] Allow pcomplete of git add to include untracked files. Date: Sat, 4 Jan 2025 05:59:18 -0800 Message-ID: References: <86frlzf1zo.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="000000000000d9c875062ae1cdd4" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4324"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Augusto Stoffel , Stefan Monnier , 75336@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jan 04 15:00:58 2025 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 1tU4i2-0000vO-8v for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 04 Jan 2025 15:00:58 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tU4hK-0007OS-4A; Sat, 04 Jan 2025 09:00:14 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tU4hA-0007Ll-DT for bug-gnu-emacs@gnu.org; Sat, 04 Jan 2025 09:00:07 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tU4hA-0003qL-3v for bug-gnu-emacs@gnu.org; Sat, 04 Jan 2025 09:00:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=Date:From:In-Reply-To:References:MIME-Version:To:Subject; bh=vG9OztQRFHwOAsFnABBmt0t8008qA14Ul5XbGwrP9+c=; b=LEBuHai+NoGHk93UW9QPwuOzSwJkxw91fHU6l/+Cm8EYlz04QKH9NC4DW8fmVoUocPgTmGRI99mY5PY2NKXcNoYmkUzRrdkZ5FrUudvV9kP7UCrgp8JB4lZmSQIkOPdizK/JKxAjTjSaz1h9X2p7+gwWYxMjT2hebf0bOjkfbiiGQJTUkYEL84dfwMZfi0yLnJMem+CpiODwFjq8yWzZv74CzKfH1vt3vA+n3098sWLJC/C0fWb3NRMEFCBwKWFNsv0P7R7VcTsNCYprbn5LV8/Bl7ykAmrQemZbrUsqc/9lKC1f21Pu+qL7U9EWlRho0ZK0PRYAqX7oSaRamwRRsw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tU4h8-000120-VV for bug-gnu-emacs@gnu.org; Sat, 04 Jan 2025 09:00:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Peter Seibel Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 04 Jan 2025 14:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75336 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 75336-submit@debbugs.gnu.org id=B75336.17359991763901 (code B ref 75336); Sat, 04 Jan 2025 14:00:02 +0000 Original-Received: (at 75336) by debbugs.gnu.org; 4 Jan 2025 13:59:36 +0000 Original-Received: from localhost ([127.0.0.1]:53962 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tU4gh-00010q-Tn for submit@debbugs.gnu.org; Sat, 04 Jan 2025 08:59:36 -0500 Original-Received: from mail-ej1-x630.google.com ([2a00:1450:4864:20::630]:38181) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tU4gd-00010b-Ep for 75336@debbugs.gnu.org; Sat, 04 Jan 2025 08:59:32 -0500 Original-Received: by mail-ej1-x630.google.com with SMTP id a640c23a62f3a-aa6a47a3da3so210763666b.1 for <75336@debbugs.gnu.org>; Sat, 04 Jan 2025 05:59:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail-com.20230601.gappssmtp.com; s=20230601; t=1735999170; x=1736603970; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=C8wrFakjqzFu2IKvPFERaSB3sWXkH8Kw98Hvd7iBtZ8=; b=WqRXwMOaahabbszUVZyAEzxYK1FVWCnlw6L9EmcsQxsFmihi7dtZeplJ9FvdTBuPhJ AypGZHAQ2Ae9mQ3cAxe2REFv0/SlqLBI63cXY/GyWUGZ5v8SQI47TPHOTkr0hxIq25/s 1qRrTk5dh9M7q6txVJXhNwQZ8Hk0VuyCbS2SLrAo84pVrNcKsXJAEgI4q+F8N7d/VrIm J6s384BlvtWkg1csrYCiRr3FIm+0g+/FK11XBH4UjQ+/jNam97bj/zl3pCKoVGVQwPT/ 44yRKuIuOdt7OQI5ibfSfvzQ/BGUe1PMVDEa3A7/jkOJhdzjktheYpdIiHwaXnVW7QyN VCFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735999170; x=1736603970; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=C8wrFakjqzFu2IKvPFERaSB3sWXkH8Kw98Hvd7iBtZ8=; b=i9K08u4/LDphZd0KuIHUlKyd76BiKENwsL1Nh1sQ5BUrA4bRnMvnSPLE+JruQhlku/ PZTm2WDL77bMpMPm44qEgwUEqiqeAdU3psmOtUqHa9VZU2aTeSABqT+7RX6zFg2FTwhS /5q6SRajer+ny4lmO5jPhXJv+zrQQDIllMIvzIO3W2TVOdDt5xRKZBa9xagzY8Advrgc sY+z59hnTjN2AlYnviSbKt76zm9gIPcePtFr18qBOWAhxMv04gwHDYbUqK9z5zFoUrll RAerxYENYWLHVCSSV6hdDJ7KPE/sA440UM/zBQoTHZFMpZ/YVs48CJN812rhSRm51nf1 eDkA== X-Forwarded-Encrypted: i=1; AJvYcCUvWPCegImK9vfRRu40lCDVZfm4T1HsFt7H+lKJufy4pGsYaFoyjSafJJGJFYmxnbCxKdRJcg==@debbugs.gnu.org X-Gm-Message-State: AOJu0YwHU4NJTdixEu682wQnBmXLm3UH47+VNBy0lqR9d6G4bKb5sw7K BxZpNbFMDd0kRvytVy0oy3az8HqnXpeZ8ftt4ifNKK34h9zsV5PfQEVuTWDNAwXHmyJcc77KbjU QFEiFU4BSopSvKI8Y9FENpn91zws= X-Gm-Gg: ASbGncuPiJMmhXO6vSeP4DiiA2b3afwJI6cS6basEmgTifwBhfWPz8YhxZkMMSTX8MF gAqr1gsFU4itWL1ck3qWwFHeT14no1LnBBho9 X-Google-Smtp-Source: AGHT+IGacuoFSeKQxSKI6/Le+m9gu8gGF5JzJEpAiri0v3vcAr5C2MmzR144RT9YL10h1y/kSbP3ZF0Z9klzYcURXwc= X-Received: by 2002:a17:907:1998:b0:aa6:6e2e:b7f with SMTP id a640c23a62f3a-aac269824f0mr1629566366b.0.1735999169858; Sat, 04 Jan 2025 05:59:29 -0800 (PST) In-Reply-To: <86frlzf1zo.fsf@gnu.org> 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:298403 Archived-At: --000000000000d9c875062ae1cdd4 Content-Type: multipart/alternative; boundary="000000000000d9c874062ae1cdd2" --000000000000d9c874062ae1cdd2 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I just realized there's a better way to do this. New patch attached. On Fri, Jan 3, 2025 at 11:54=E2=80=AFPM Eli Zaretskii wrote: > > From: Peter Seibel > > Date: Fri, 3 Jan 2025 16:00:27 -0800 > > > > I was going a bit crazy trying to figure out why tab completion in > *shell* wasn't working for git add when I was > > trying to add a new file to my repo. Turns out pcomplete was only > completing modified tracked files.This > > patch changes it so after git add it also completes untracked > non-ignored files. > > Augusto and Stefan, any comments? > --=20 Peter Seibel http://www.gigamonkeys.com/ --000000000000d9c874062ae1cdd2 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I just realized there's a better way to do this. New p= atch attached.

On Fri, Jan 3, 2025 at 11:54=E2=80=AFPM= Eli Zaretskii <eliz@gnu.org> wro= te:
> From: P= eter Seibel <= peter@gigamonkeys.com>
> Date: Fri, 3 Jan 2025 16:00:27 -0800
>
> I was going a bit crazy trying to figure out why tab completion in *sh= ell* wasn't working for git add when I was
> trying to add a new file to my repo. Turns out pcomplete was only comp= leting modified tracked files.This
> patch changes it so after git add it also completes untracked non-igno= red files.

Augusto and Stefan, any comments?


--
--000000000000d9c874062ae1cdd2-- --000000000000d9c875062ae1cdd4 Content-Type: application/octet-stream; name="0002-Simpler-way-to-get-list-of-addable-files.patch" Content-Disposition: attachment; filename="0002-Simpler-way-to-get-list-of-addable-files.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_m5i92gw20 RnJvbSBhYzk4ZmRkNDk0ZTdkMDI1YWU0N2NmNDU0MjRkOWNkYWVlZjdmMTA0IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBQZXRlciBTZWliZWwgPHBldGVyQGdpZ2Ftb25rZXlzLmNvbT4K RGF0ZTogU2F0LCA0IEphbiAyMDI1IDA1OjU0OjMxIC0wODAwClN1YmplY3Q6IFtQQVRDSCAyLzJd IFNpbXBsZXIgd2F5IHRvIGdldCBsaXN0IG9mIGFkZGFibGUgZmlsZXMuCgotLS0KIGxpc3AvcGNt cGwtZ2l0LmVsIHwgNyArLS0tLS0tCiAxIGZpbGUgY2hhbmdlZCwgMSBpbnNlcnRpb24oKyksIDYg ZGVsZXRpb25zKC0pCgpkaWZmIC0tZ2l0IGEvbGlzcC9wY21wbC1naXQuZWwgYi9saXNwL3BjbXBs LWdpdC5lbAppbmRleCA0OTg5MThhYzFjNC4uYWI1ZTMzMDU4NjUgMTAwNjQ0Ci0tLSBhL2xpc3Av cGNtcGwtZ2l0LmVsCisrKyBiL2xpc3AvcGNtcGwtZ2l0LmVsCkBAIC04NiwxMiArODYsNyBAQCBG aWxlcyBsaXN0ZWQgYnkgYGdpdCBscy1maWxlcyBBUkdTJyBzYXRpc2Z5IHRoZSBwcmVkaWNhdGUu IgogICAgICAgICAgICAgICAgKCJhZGQiCiAgICAgICAgICAgICAgICAgKHBjb21wbGV0ZS1oZXJl CiAgICAgICAgICAgICAgICAgIChwY29tcGxldGUtZW50cmllcwotICAgICAgICAgICAgICAgICAg bmlsIChsZXQgKChtb2RpZmllZCAocGNtcGwtZ2l0LS10cmFja2VkLWZpbGUtcHJlZGljYXRlICIt bSIpKQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICh1bnRyYWNrZWQgKHBjbXBsLWdpdC0t dHJhY2tlZC1maWxlLXByZWRpY2F0ZSAiLW8iICItLWV4Y2x1ZGUtc3RhbmRhcmQiKSkpCi0gICAg ICAgICAgICAgICAgICAgICAgICAobGFtYmRhIChmaWxlKQotICAgICAgICAgICAgICAgICAgICAg ICAgICAob3IKLSAgICAgICAgICAgICAgICAgICAgICAgICAgIChhbmQgbW9kaWZpZWQgKGZ1bmNh bGwgbW9kaWZpZWQgZmlsZSkpCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAoYW5kIHVudHJh Y2tlZCAoZnVuY2FsbCB1bnRyYWNrZWQgZmlsZSkpKSkpKSkpCisgICAgICAgICAgICAgICAgICBu aWwgKHBjbXBsLWdpdC0tdHJhY2tlZC1maWxlLXByZWRpY2F0ZSAiLW8iICItLWV4Y2x1ZGUtc3Rh bmRhcmQiICItbSIpKSkpCiAgICAgICAgICAgICAgICA7OyBDb21wbGV0ZSBtb2RpZmllZCB0cmFj a2VkIGZpbGVzCiAgICAgICAgICAgICAgICAoKG9yICJjb21taXQiICJyZXN0b3JlIikKICAgICAg ICAgICAgICAgICAocGNvbXBsZXRlLWhlcmUKLS0gCjIuNDcuMQoK --000000000000d9c875062ae1cdd4--