Message ID | cover.1742655515.git.45mg.writes@gmail.com |
---|---|
Headers |
Return-Path: <guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org> X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 2131E27BBEA; Sat, 22 Mar 2025 15:06:16 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.6 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL, RCVD_IN_VALIDITY_SAFE,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id BCC5327BBE2 for <patchwork@mira.cbaines.net>; Sat, 22 Mar 2025 15:06:15 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <guix-patches-bounces@gnu.org>) id 1tw0QL-00061S-NX; Sat, 22 Mar 2025 11:06:09 -0400 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 <Debian-debbugs@debbugs.gnu.org>) id 1tw0QF-000614-8y for guix-patches@gnu.org; Sat, 22 Mar 2025 11:06:03 -0400 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 <Debian-debbugs@debbugs.gnu.org>) id 1tw0QE-0000S4-Up for guix-patches@gnu.org; Sat, 22 Mar 2025 11:06:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:Subject; bh=2ypNxXIP8qw/xEAWe/OYUAhDV8bIQ0I4c//2QTn5Gxs=; b=trvvdV0fUboBXhD+UY+MUogaRE4YHcr2NulmLpZOX5lH3/+qTGg1bpq033Vzky9J4Cxzo+FcT8q9ofw07H2kJCVcYW/J3EY2WkXX6nNDd/W3i6o79BW+aB2nYkaDpsGPNZqMo5rw4GHStIAWFTIMDqdSLCmKnW3qSN8oWW1Pf0a/+jE1tX7ElH/8cSfS1KNKogZy4+ScqKQbgqR7IUZQDWIc2Nib0nQx6uHKyaPcXKI55YYp07fY+bTU6cOTLguBEEItpttrN5j77LzaJT1eQdb5zAslfuC3kjyzcsWNOh9+5XOYuecuqNQuLU437Uwf1e5Q5vpdj0PFd7jEyUF+bA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1tw0QE-0005c5-PA for guix-patches@gnu.org; Sat, 22 Mar 2025 11:06:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77181] [PATCH 0/5] gnu: Fix bash completion directories. Resent-From: 45mg <45mg.writes@gmail.com> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org> Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 22 Mar 2025 15:06:02 +0000 Resent-Message-ID: <handler.77181.B.174265590721148@debbugs.gnu.org> Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 77181 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 77181@debbugs.gnu.org Cc: 45mg <45mg.writes@gmail.com> X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.174265590721148 (code B ref -1); Sat, 22 Mar 2025 15:06:02 +0000 Received: (at submit) by debbugs.gnu.org; 22 Mar 2025 15:05:07 +0000 Received: from localhost ([127.0.0.1]:44582 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>) id 1tw0PK-0005V1-IV for submit@debbugs.gnu.org; Sat, 22 Mar 2025 11:05:06 -0400 Received: from lists.gnu.org ([2001:470:142::17]:35398) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <45mg.writes@gmail.com>) id 1tw0PI-0005UN-Rg for submit@debbugs.gnu.org; Sat, 22 Mar 2025 11:05:05 -0400 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 <45mg.writes@gmail.com>) id 1tw0PC-0005t1-I7 for guix-patches@gnu.org; Sat, 22 Mar 2025 11:04:58 -0400 Received: from mail-pj1-x1041.google.com ([2607:f8b0:4864:20::1041]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <45mg.writes@gmail.com>) id 1tw0PA-00008M-H6 for guix-patches@gnu.org; Sat, 22 Mar 2025 11:04:57 -0400 Received: by mail-pj1-x1041.google.com with SMTP id 98e67ed59e1d1-3015001f862so3850624a91.3 for <guix-patches@gnu.org>; Sat, 22 Mar 2025 08:04:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1742655894; x=1743260694; darn=gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=2ypNxXIP8qw/xEAWe/OYUAhDV8bIQ0I4c//2QTn5Gxs=; b=k4daGxUmlr7FJmm+Aqj9gkTFzY2SMKG7Ykp14F89bjcsD44lIVt823KmksNdCHSsOs RE06DeNXPXuS+6xqqHqCiSKLpH4Z8L8wO9NzsSbB4NxX8zortAQoXVwylCKMnU6eKsWN vITdZF19btDA1Dc5/MxJ56aNRkl3S8QJ/jirCGZ4dQg4FYC+W0F0NfMrR7af8ySpBpNN 2U66F4/szg0BqZLgBBbLqg0PaoWhSDsPcDXcMnFWLfj7p3U4w5NDfDtbQLNJrYx9Zt7O oekLSgrcdJdbdrg7CtEikiKMBjU7VpiH5HIvNwxC6UDSe72O8hZtHLYSzDhYmt4Pa2PE VaJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742655894; x=1743260694; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=2ypNxXIP8qw/xEAWe/OYUAhDV8bIQ0I4c//2QTn5Gxs=; b=CO90XILHRwkJHiXicWaHiut2GMV7HhEQ9n5eDUlfqc9IcUlCbkrwRpyZ1/1TW7tDnz CGJAd1fJg8IW3xvqlFX9HOE/QnWT/5Q/rKxImqeVRANG70I6n4tUZhF/TiTYHHLzBihM zb7V2CzBweVkjBs/1fL1Hl3pyJN5wdYnZIE6ZxCFjxYfBIpSVfr5QE8A2Y4s5VY5ZkUS kVobgUkGZMn8AYEkp8WuZcz8e+FfoxYqYHfn4+fb9yUlQVIDChwMKDL922uLgbmBB0OJ XskX7SMDGsjYvg9eM5mFn6n60p/2kvrZuxcg+7FTmCtGmbUYVDxq54JhctejkLDzm8dS V+Ag== X-Gm-Message-State: AOJu0YwYqeOtZ//475l8Vl/utV6CGmMhFxjwu59FS++YULvzeN6oQ1xA GEwfN3ODxxQ4eEeWmfWCaAG3WFUtQrevf0RWS1kKgsbEQc5BzZi0tVqtL/gg X-Gm-Gg: ASbGncsx2zI3sEqQihY3jOXPM74HcmVZJ3bBva9OuKFOuJkBkdi5ldFbY2DuGLziWnk lEzJuORhU1LICfYIG/YyGsKVHOr+u8R05MSKr6aQC+xkZlmcEsAnhKlGn/pK2BjeQZcp8suk/Bh 6MqsNYzD720DLoavT8nHaZ9fCDFvW22phoh8iZzujhsxDqb4XI3KDxNgRYnFLNydbFNPM50t1qn +oMXdgj7Tvjo/EPwpg1w0Z4mqEo+/tvZLi/me+mMupk92eUqHAlaFU5IDiU3fSsr39qA202gSqT 8MqzlvsvK7vSNIJ0UwwIsRywiKDY9FjxGCdAzmLFJetE4C47ajUd6kz1gPIrhMKg6EmrIl+sAuC XLQ== X-Google-Smtp-Source: AGHT+IFLKMhALQaQdzauhkZJXVHnQ+0/Tq8EpaEdA2eeKf5L7PRYo55GhD9hiVVlQSIkDExDr3+Xgg== X-Received: by 2002:a17:90b:1f90:b0:2ff:692b:b15 with SMTP id 98e67ed59e1d1-30310019885mr14177643a91.33.1742655894369; Sat, 22 Mar 2025 08:04:54 -0700 (PDT) Received: from localhost.localdomain (utm3.nitt.edu. [14.139.162.2]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-22780f39692sm36818085ad.44.2025.03.22.08.04.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 22 Mar 2025 08:04:54 -0700 (PDT) From: 45mg <45mg.writes@gmail.com> Date: Sat, 22 Mar 2025 20:34:41 +0530 Message-ID: <cover.1742655515.git.45mg.writes@gmail.com> X-Mailer: git-send-email 2.49.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::1041; envelope-from=45mg.writes@gmail.com; helo=mail-pj1-x1041.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: <guix-patches.gnu.org> List-Unsubscribe: <https://lists.gnu.org/mailman/options/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=unsubscribe> List-Archive: <https://lists.gnu.org/archive/html/guix-patches> List-Post: <mailto:guix-patches@gnu.org> List-Help: <mailto:guix-patches-request@gnu.org?subject=help> List-Subscribe: <https://lists.gnu.org/mailman/listinfo/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=subscribe> Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches |
Series |
gnu: Fix bash completion directories.
|
|
Message
45mg
March 22, 2025, 3:04 p.m. UTC
The following patches correct the exact same mistake found in 5 package definitions: bash completions were installed to '/etc/bash-completion.d' instead of '/etc/bash_completion.d'. The latter is necessary for the bash-completion package to find and load the installed completions. 45mg (5): gnu: pass-age: Fix bash completion directory. gnu: ouch: Fix bash completion directory. gnu: git-delta: Fix bash completion directory. gnu: zoxide: Fix bash completion directory. gnu: starship: Fix bash completion directory. gnu/packages/password-utils.scm | 2 +- gnu/packages/rust-apps.scm | 6 +++--- gnu/packages/shellutils.scm | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) base-commit: fbfd2b93831978aadbb96f32cafdab997b04c6c6
Comments
Hi 45mg, 45mg <45mg.writes@gmail.com> writes: > The following patches correct the exact same mistake found in 5 > package > definitions: bash completions were installed to > '/etc/bash-completion.d' > instead of '/etc/bash_completion.d'. The latter is necessary for > the > bash-completion package to find and load the installed > completions. > The changes seem fine, but could you link to somewhere explaining (or explain yourself) how bash completions are supposed to work? In addition to /etc/bash_completions.d, I see many packages installing them into /share/bash-completion. Do both locations work? Do we need to move eveything into one or the other location? Thanks, -- Ian
Hi Ian, Ian Eure <ian@retrospec.tv> writes: [...] > The changes seem fine, but could you link to somewhere explaining > (or explain yourself) how bash completions are supposed to work? > In addition to /etc/bash_completions.d, I see many packages > installing them into /share/bash-completion. Do both locations > work? Do we need to move eveything into one or the other > location? Here's a snippet from the bash-completion project's FAQ, explaining this: https://github.com/scop/bash-completion?tab=readme-ov-file#faq --8<---------------cut here---------------start------------->8--- Q. I author/maintain package X and would like to maintain my own completion code for this package. Where should I put it to be sure that interactive bash shells will find it and source it? A. [ Disclaimer: Here, how to make the completion code visible to bash-completion is explained. We do not require always making the completion code visible to bash-completion. In what condition the completion code is installed should be determined at the author/maintainers' own discretion. ] Install it in one of the directories pointed to by bash-completion's pkgconfig file variables. There are two alternatives: The recommended directory is completionsdir, which you can get with pkg-config --variable=completionsdir bash-completion. From this directory, completions are automatically loaded on demand based on invoked commands' names, so be sure to name your completion file accordingly, and to include (for example) symbolic links in case the file provides completions for more than one command. The completion filename for command foo in this directory should be either foo, or foo.bash. (Underscore prefixed _foo works too, but is reserved for bash-completion internal use as a deprecation/fallback marker.) The other directory which is only present for backwards compatibility, its usage is no longer recommended, is compatdir (get it with pkg-config --variable=compatdir bash-completion). From this directory, files are loaded eagerly when bash_completion is loaded. --8<---------------cut here---------------end--------------->8--- On Guix, we have: --8<---------------cut here---------------start------------->8--- # guix shell pkg-config bash-completion [user@guix1 ]$ pkg-config --variable=completionsdir bash-completion /gnu/store/5774mb64pqw93fpcchndiiq9fh80ngga-bash-completion-2.11/share/bash-completion/completions [user@guix1 ]$ pkg-config --variable=compatdir bash-completion /gnu/store/5774mb64pqw93fpcchndiiq9fh80ngga-bash-completion-2.11/etc/bash_completion.d --8<---------------cut here---------------end--------------->8--- So, it looks like we should ideally be installing into share/bash-completion/completions everywhere. etc/bash_completion.d will also work, but the former is preferred because completions will be loaded on-demand rather than eagerly. There are currently dozens of packages using the latter; maybe some of them have a reason to eager-load their completions.