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: Fri, 3 Jan 2025 16:00:27 -0800 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="000000000000dc671d062ad615a5" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32051"; mail-complaints-to="usenet@ciao.gmane.io" To: 75336@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jan 04 04:34:24 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 1tTuvf-0008Cu-Q6 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 04 Jan 2025 04:34:24 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tTuvM-0006c5-89; Fri, 03 Jan 2025 22:34:04 -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 1tTuvK-0006bl-R6 for bug-gnu-emacs@gnu.org; Fri, 03 Jan 2025 22:34:03 -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 1tTuvK-0008Vs-In for bug-gnu-emacs@gnu.org; Fri, 03 Jan 2025 22:34:02 -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:MIME-Version:To:Subject; bh=9xGsHPAjx8ed/1nwIL3RFetT2brXFKH58uU6pBeQby4=; b=UjVV9OCRwVG75pqNBSNqOYMtay37EgjJZvQAsDO+yH2qByC4w1YwQTHjLOyfjcYVMOLTV/cjH2KRE6Ee5jdhd8CN9WwZ9MEiYxQJbjKOEPi+ZiBP5OXuwp1XMqUA7SQ5rWDcMALfl0gisaE+yuBVW5G3WZDKnO2h16w73Jr0jZ43ZOddnc+MbNL1cfJ+wdaufj2j2mebKOWFLtZC7PWk8JO3IWIsIoh0cPWMHRc6yOgPIBGXDFncQEdpoD65+U2xmV5LvzwSZ5rL6ijMYb3iclBFUZfwffl39NihVkYidfUhmq6oxs53aoo8GgPyMMHEc6MdDge7UhE2NP+ou5SLRA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tTuvK-0005RY-4c for bug-gnu-emacs@gnu.org; Fri, 03 Jan 2025 22:34:02 -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 03:34:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 75336 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.173596159120849 (code B ref -1); Sat, 04 Jan 2025 03:34:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 4 Jan 2025 03:33:11 +0000 Original-Received: from localhost ([127.0.0.1]:52886 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tTuuU-0005QB-4x for submit@debbugs.gnu.org; Fri, 03 Jan 2025 22:33:11 -0500 Original-Received: from lists.gnu.org ([2001:470:142::17]:58398) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tTrb1-0003qQ-PM for submit@debbugs.gnu.org; Fri, 03 Jan 2025 19:00:52 -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 1tTrav-0007uK-Cw for bug-gnu-emacs@gnu.org; Fri, 03 Jan 2025 19:00:45 -0500 Original-Received: from mail-ej1-x636.google.com ([2a00:1450:4864:20::636]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tTrat-0004uj-5Z for bug-gnu-emacs@gnu.org; Fri, 03 Jan 2025 19:00:45 -0500 Original-Received: by mail-ej1-x636.google.com with SMTP id a640c23a62f3a-aa6647a7556so232777866b.2 for ; Fri, 03 Jan 2025 16:00:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail-com.20230601.gappssmtp.com; s=20230601; t=1735948838; x=1736553638; darn=gnu.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=LviBt5yFJU19hypCvVxq3uAafQzY7+aEx2bitDLhQOc=; b=I39Mcs0vTm3/wQoJHUXyMXz0oT1tPNHkPcan/PHqwzqbRFmV84qQoST4soTkEPjENd wyDAZJ5k9eN1vESQkiD7dtp43j96bWXpqoL1KvQFfLTt+kkaUSLksLiF81ASRpa5IG+d 5fC6vwDBCSuBzvVgHueijzcsP4PvVfk2PMKQxGHAuZxGxoiA9RvZEttzsnuWka6WjimN WrLRJkHrVLNOgy/AB8CyiulGttt9UDcSDh31UolNMCI3w2noioITG4Xd0LGysxLPmLAn Hk4UdNDg1SEH37rUY8HUIbUUyh552aRQkzA/uFw3PEt8WI5byI3lUTRBqfIh7StWidwQ FbJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735948838; x=1736553638; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=LviBt5yFJU19hypCvVxq3uAafQzY7+aEx2bitDLhQOc=; b=rL1hKf20qdVLTiUGMZctn1fTnjEAmLfKpBx8Dd0m9PC18ytotEuMiZniVQ6PcWE4BD EI2P2RYiFrG4zSshglwMi/FsyciUnZiKHlXu+8G5k0yC7JJOfu0p0ZhvME9hSk2WP21w gE0ln5vHiJZMg5hTzAi4tHNirxNLTIfYIClMKH4wwDIBLZAfBbiBts6JJQ0RZ1qVf0EX f+Rlcptvxsox+Tu9GO+fMVpxY0e+6/NxeHgVw9omvqwWuzHBpZMEF05+kA3si/MaZeX+ EVmgHO2za+nqScBQoNKkLp/kDKWragl4wn7AnJuU9hKgrr8E+s2VXI5bFRsiBF7vAaWA qwTw== X-Gm-Message-State: AOJu0Yz10QPKDeypG9Es4yZE6WHzG86k1JfKzI+bVTVFqE3oe4Qgeg0l BL25h/rAtpaqw4loo4JIsC4D65lTcN1JPTNSriawzpPLIeFafa3jGNQ4vE86FjQ9opf0G5qUWDS D7ldksyHvXxpGGVTbAA7jBEatIml06UM5 X-Gm-Gg: ASbGncvmlsGbFG0G/jFa+X7dVw25b6J4LxjKS4WPIlCKT3W9f9C8y2dMQBCPG5EU7jx YtMrtdWHpZuO14Kc0FtiNq9U1Vkgf3gn8u/as X-Google-Smtp-Source: AGHT+IFECQUv0N64NYDKbC/dPBBlzPat7yOqYmnokVMxbZVCIIxt71gZszkbTW5/zeV/ut/4Ulu0YKfpFJDUFRyHyT0= X-Received: by 2002:a17:907:7e92:b0:aa6:a674:be3c with SMTP id a640c23a62f3a-aac2adb56d7mr1785715066b.5.1735948838381; Fri, 03 Jan 2025 16:00:38 -0800 (PST) Received-SPF: pass client-ip=2a00:1450:4864:20::636; envelope-from=peter.seibel@gmail.com; helo=mail-ej1-x636.google.com X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.204, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Fri, 03 Jan 2025 22:33:08 -0500 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:298321 Archived-At: --000000000000dc671d062ad615a5 Content-Type: multipart/alternative; boundary="000000000000dc671b062ad615a3" --000000000000dc671b062ad615a3 Content-Type: text/plain; charset="UTF-8" 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. I believe I long ago signed a Copyright assignment to the Emacs project but I'm happy to do it again if that's still required. Cheers! -- Peter Seibel http://www.gigamonkeys.com/ --000000000000dc671b062ad615a3 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
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 a= dd 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 untr= acked non-ignored files.

I believe I long ago sign= ed a Copyright assignment to the Emacs project but I'm happy to do it a= gain if that's still required. Cheers!

--000000000000dc671b062ad615a3-- --000000000000dc671d062ad615a5 Content-Type: application/octet-stream; name="0001-Allow-pcomplete-of-git-add-to-include-untracked-file.patch" Content-Disposition: attachment; filename="0001-Allow-pcomplete-of-git-add-to-include-untracked-file.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_m5hf2awz0 RnJvbSA3ODkwYTIzMDk1M2MwODFkOTNjODA2YzhhODAyYWE2OTQ1MmQ3ZTI4IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBQZXRlciBTZWliZWwgPHBldGVyQGdpZ2Ftb25rZXlzLmNvbT4K RGF0ZTogRnJpLCAzIEphbiAyMDI1IDE1OjU2OjAxIC0wODAwClN1YmplY3Q6IFtQQVRDSF0gQWxs b3cgcGNvbXBsZXRlIG9mIGdpdCBhZGQgdG8gaW5jbHVkZSB1bnRyYWNrZWQgZmlsZXMuCgotLS0K IGxpc3AvcGNtcGwtZ2l0LmVsIHwgMTIgKysrKysrKysrKystCiAxIGZpbGUgY2hhbmdlZCwgMTEg aW5zZXJ0aW9ucygrKSwgMSBkZWxldGlvbigtKQoKZGlmZiAtLWdpdCBhL2xpc3AvcGNtcGwtZ2l0 LmVsIGIvbGlzcC9wY21wbC1naXQuZWwKaW5kZXggZjU3YzJkNTQ3MGEuLjQ5ODkxOGFjMWM0IDEw MDY0NAotLS0gYS9saXNwL3BjbXBsLWdpdC5lbAorKysgYi9saXNwL3BjbXBsLWdpdC5lbApAQCAt ODIsOCArODIsMTggQEAgRmlsZXMgbGlzdGVkIGJ5IGBnaXQgbHMtZmlsZXMgQVJHUycgc2F0aXNm eSB0aGUgcHJlZGljYXRlLiIKICAgICAgICAgICAgICAgICAgIChwY29tcGxldGUtZnJvbS1oZWxw IGAoLHZjLWdpdC1wcm9ncmFtICJoZWxwIiAsc3ViY21kKQogICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgOmFyZ3VtZW50CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAiLStcXCg/OlxcW25vLVxcXVxcKT9bYS16LV0rPT8iKSkpKQorICAgICAgICAg ICAgICAgOzsgQ29tcGxldGUgbW9kaWZpZWQgdHJhY2tlZCBmaWxlcyBhbmQgdW50cmFja2VkIGZp bGVzCisgICAgICAgICAgICAgICAoImFkZCIKKyAgICAgICAgICAgICAgICAocGNvbXBsZXRlLWhl cmUKKyAgICAgICAgICAgICAgICAgKHBjb21wbGV0ZS1lbnRyaWVzCisgICAgICAgICAgICAgICAg ICBuaWwgKGxldCAoKG1vZGlmaWVkIChwY21wbC1naXQtLXRyYWNrZWQtZmlsZS1wcmVkaWNhdGUg Ii1tIikpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHVudHJhY2tlZCAocGNtcGwtZ2l0 LS10cmFja2VkLWZpbGUtcHJlZGljYXRlICItbyIgIi0tZXhjbHVkZS1zdGFuZGFyZCIpKSkKKyAg ICAgICAgICAgICAgICAgICAgICAgIChsYW1iZGEgKGZpbGUpCisgICAgICAgICAgICAgICAgICAg ICAgICAgIChvcgorICAgICAgICAgICAgICAgICAgICAgICAgICAgKGFuZCBtb2RpZmllZCAoZnVu Y2FsbCBtb2RpZmllZCBmaWxlKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIChhbmQgdW50 cmFja2VkIChmdW5jYWxsIHVudHJhY2tlZCBmaWxlKSkpKSkpKSkKICAgICAgICAgICAgICAgIDs7 IENvbXBsZXRlIG1vZGlmaWVkIHRyYWNrZWQgZmlsZXMKLSAgICAgICAgICAgICAgICgob3IgImFk ZCIgImNvbW1pdCIgInJlc3RvcmUiKQorICAgICAgICAgICAgICAgKChvciAiY29tbWl0IiAicmVz dG9yZSIpCiAgICAgICAgICAgICAgICAgKHBjb21wbGV0ZS1oZXJlCiAgICAgICAgICAgICAgICAg IChwY29tcGxldGUtZW50cmllcwogICAgICAgICAgICAgICAgICAgbmlsIChwY21wbC1naXQtLXRy YWNrZWQtZmlsZS1wcmVkaWNhdGUgIi1tIikpKSkKLS0gCjIuNDcuMQoK --000000000000dc671d062ad615a5--