Message ID | Z-LHGMeTZHfkOTqE@3900XT |
---|---|
State | New |
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 E723F27BBEA; Tue, 25 Mar 2025 15:10:25 +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=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,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 3CDB927BBE2 for <patchwork@mira.cbaines.net>; Tue, 25 Mar 2025 15:10:25 +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 1tx5un-0003nw-3k; Tue, 25 Mar 2025 11:10: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 <Debian-debbugs@debbugs.gnu.org>) id 1tx5uk-0003nD-C7 for guix-patches@gnu.org; Tue, 25 Mar 2025 11:10:02 -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 1tx5uj-0007a7-WA for guix-patches@gnu.org; Tue, 25 Mar 2025 11:10:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=In-Reply-To:MIME-Version:References:From:Date:To:Subject; bh=De/V1rbOuYj0DZVdkPSl7BeR+tohHGeuUccz1UnnLYI=; b=jjBu2eESP/IJ/3qjIpPlXuIkp5qLjm4aiU7EeSkXD6DcQQ1BOZ7mbPEaewMZLHtfwRjyb1cOkDheZ5ZVmNC5MIObVQ/skwGxPj8asX8q5JyLKmIwrBgLblLUL+eqUKwJyMBdBTf8pmjGuM5BtGAYTFhKEsOLgoBkp+ExpBcZmsOq40lcBBoxxWvb0QHqk6IE773fodd7uudZlyNiOvbzOv5mVZF+ETZ54uvFx9P2oGVaoo9aSFEy/j17EndfmLTugK09dJ2TwNnjIs37/pTLmcYHcV3TRHWbPGc6YD54itREk8XcIcQUmCiRyRpdNQ9NJ5ng/MPHsH4Gz3LViylKow==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1tx5uj-00017b-RN for guix-patches@gnu.org; Tue, 25 Mar 2025 11:10:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77181] [PATCH 0/5] gnu: Fix bash completion directories. Resent-From: Efraim Flashner <efraim@flashner.co.il> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org> Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 25 Mar 2025 15:10:01 +0000 Resent-Message-ID: <handler.77181.B77181.17429153864274@debbugs.gnu.org> Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 77181 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 45mg <45mg.writes@gmail.com> Cc: 77181@debbugs.gnu.org, Ian Eure <ian@retrospec.tv> Received: via spool by 77181-submit@debbugs.gnu.org id=B77181.17429153864274 (code B ref 77181); Tue, 25 Mar 2025 15:10:01 +0000 Received: (at 77181) by debbugs.gnu.org; 25 Mar 2025 15:09:46 +0000 Received: from localhost ([127.0.0.1]:39621 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>) id 1tx5uT-00016s-Ia for submit@debbugs.gnu.org; Tue, 25 Mar 2025 11:09:45 -0400 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]:54552) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <efraim.flashner@gmail.com>) id 1tx5uQ-00016V-Tz for 77181@debbugs.gnu.org; Tue, 25 Mar 2025 11:09:43 -0400 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-43d07ca6a80so28731855e9.1 for <77181@debbugs.gnu.org>; Tue, 25 Mar 2025 08:09:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1742915377; x=1743520177; darn=debbugs.gnu.org; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date:sender:from:to :cc:subject:date:message-id:reply-to; bh=De/V1rbOuYj0DZVdkPSl7BeR+tohHGeuUccz1UnnLYI=; b=TbTU7XDTp0nTiRpbtDDfcspvJbZlPQDTh2KgAHJZlEEZXzZDQG1k4LN8P/lHMt6vl7 P/bcl+tXzigmlyTaSpBi0wpbWBg+Fm2RrpXG++mhXtsCIhPULIwVnMuLj0RUmeWMvusM 0J+3uIpH25I+H1oIrmJQchppv5zAosUZg/kaGmjiaendaZymSbvu0oXSIOnoyY+LRmEU m4QzxmIPRM39+2P7IlRg82Mhh1Oq457LREvqjDf596A0oiBaPCmJi6JnYrLqhCkqzGjt Os1SrCQkmx+IvLRgvYBhQGQjMqftaytdAtuQmH0eNPDOsYfxxOVQQO2NwtXh9WGltp9T 31vA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742915377; x=1743520177; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date:sender :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=De/V1rbOuYj0DZVdkPSl7BeR+tohHGeuUccz1UnnLYI=; b=D8k8SuNyV/qC+Ng10dUCH8U51vvpW2F/bDjD+iveqw/e+66QeXx2EUv8Sne6Y1cgab q4572bAo1eUxanXVSL4VEbxvykg0oJtvZg5n8xqf1D/XeTTmr6P7KRzuVGGgVWAuo/NS kG6hISLBzXMYmAPkLWoGd1lRdhJs+Tjd7SSg2N4ETpLdUaDrA06CoJE69++1dO0QNhd+ ZSSfUgoxgFHUKuIuFeEmP8N80tTBFtJ8rPj5eMDIqNwsINJjaZY7vCPoH+l2E/kE+qpw kNndneEULtiLXFT21OIpwZp5TMQbn2Gz2lQzvZJRrIAiEkyGSGkRbtcK9ZvDo8fs0cQP nm5Q== X-Forwarded-Encrypted: i=1; AJvYcCWcOabd5qGkbmD4f4QncwVAchpt9394+Kbtiic0sruisKWQCP/i/wGFP5oEMrMZ17kZrfdPRg==@debbugs.gnu.org X-Gm-Message-State: AOJu0YzGHhK32efrLTaEmjvAI/PffKErU9uFuz0VFlNgci6X7uN4PLGC l9El/4h10eckPTVKjAkePTmSwXbqvLz3/oU+qZD6/efj2+NcHyT3U8EbUu+I X-Gm-Gg: ASbGnct3BA9NkgDr46CKg0Ai2EpucRWU9GUQgqYJQpiDzKx9n8KXke7AHP8TmSArvM5 ES9cFH7UnyyV18A1MqljW+FHbG5AuT3e7f0TZyinxZ+Z6KI1NNhEvuxMbvZSAceIgaEoPdZVl2t Z75Mdgklsp27V+cCgg+O6Hg5ou9DfUTmse1oREFtH3vMmSPZZ94tLSSPq3vUjyFg8dil4bZRYdk mf/RRkbnl7Ol5aViDns4kNzR7jVeGD5viY1py8E+YLthwVhemJ79SkLXycMu6WzzRTP2xmaYkMl I3l6Wc63fFpZU9S9vxLwh15HbDCaKY7e/KwrprziBUFuc8ITRpZMbQ== X-Google-Smtp-Source: AGHT+IHhVLDKYqZZzslaQ53Ue3wj1lZAg/9B/SQH1sdihNKUpymbMj2e+XFYnrWr8KEONY9oJywKyQ== X-Received: by 2002:a05:6000:184e:b0:39a:c6c1:3408 with SMTP id ffacd0b85a97d-39ac6c13529mr3891911f8f.37.1742915376333; Tue, 25 Mar 2025 08:09:36 -0700 (PDT) Received: from localhost ([141.226.15.94]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3997f9a3b4bsm13838304f8f.25.2025.03.25.08.09.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Mar 2025 08:09:35 -0700 (PDT) Date: Tue, 25 Mar 2025 17:09:12 +0200 From: Efraim Flashner <efraim@flashner.co.il> Message-ID: <Z-LHGMeTZHfkOTqE@3900XT> Mail-Followup-To: Efraim Flashner <efraim@flashner.co.il>, 45mg <45mg.writes@gmail.com>, Ian Eure <ian@retrospec.tv>, 77181@debbugs.gnu.org References: <877c4hhvhs.fsf@retrospec.tv> <87zfhdasld.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="5GTRKW4IPlosz9sD" Content-Disposition: inline In-Reply-To: <87zfhdasld.fsf@gmail.com> X-PGP-Key-ID: 0x41AAE7DCCA3D8351 X-PGP-Key: https://flashner.co.il/~efraim/efraim_flashner.asc X-PGP-Fingerprint: A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 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 |
Commit Message
Efraim Flashner
March 25, 2025, 3:09 p.m. UTC
On Sat, Mar 22, 2025 at 05:22:06PM +0000, 45mg wrote: > Hi Ian, > [...] > > 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. I have the following diff I think will be useful. Let me know what you think. We shouldn't need to duplicate the paths in all the packages.
Comments
Efraim Flashner <efraim@flashner.co.il> writes: > > I have the following diff I think will be useful. Let me know what you > think. We shouldn't need to duplicate the paths in all the packages. > > -- > Efraim Flashner <efraim@flashner.co.il> אפרים פלשנר > GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 > Confidentiality cannot be guaranteed on emails sent or received unencrypted > diff --git a/guix/utils.scm b/guix/utils.scm > index c7c23d9d5ba..c0c044147e2 100644 > --- a/guix/utils.scm > +++ b/guix/utils.scm > @@ -149,6 +149,12 @@ (define-module (guix utils) > config-directory > cache-directory > > + bash-completion-dir > + fish-completion-dir > + zsh-completion-dir > + elvish-completion-dir > + nu-completion-dir > + > readlink* > go-to-location > edit-expression > @@ -1193,6 +1199,33 @@ (define-syntax current-source-directory > ;; raising an error would upset Geiser users > #f)))))) > > + > +;;; > +;;; Shell completion directories. > +;;; > + > +(define bash-completion-dir > + ;; The standard directory for installing bash completions. > + ;; https://github.com/scop/bash-completion?tab=readme-ov-file#faq > + "/share/bash-completion/completions/") > + > +(define fish-completion-dir > + ;; The standard directory for installing fish completions. > + ;; https://fishshell.com/docs/current/completions.html#where-to-put-completions > + "/share/fish/vendor_completions.d/") > + > +(define zsh-completion-dir > + ;; The standard directory for installing zsh completions. > + "/share/zsh/site-functions/") > + > +(define elvish-completion-dir > + ;; The standard directory for installing elvish completions. > + "/share/elvish/lib/") > + > +(define nu-completion-dir > + ;; The standard directory for installing nushell completions. > + "/share/nushell/vendor/autoload/") > + > > ;;; > ;;; String comparison. Seems reasonable. I suppose we could use these variables for all packages that already use these standard directories (lots of rebuilds though!). As for the ones that use eg. `/etc/bash_completion.d`, I think we should probably leave those as they are, unless someone's willing to investigate each one and make sure they don't need to eager-load their completion scripts, or have some other reason to use that directory.
diff --git a/guix/utils.scm b/guix/utils.scm index c7c23d9d5ba..c0c044147e2 100644 --- a/guix/utils.scm +++ b/guix/utils.scm @@ -149,6 +149,12 @@ (define-module (guix utils) config-directory cache-directory + bash-completion-dir + fish-completion-dir + zsh-completion-dir + elvish-completion-dir + nu-completion-dir + readlink* go-to-location edit-expression @@ -1193,6 +1199,33 @@ (define-syntax current-source-directory ;; raising an error would upset Geiser users #f)))))) + +;;; +;;; Shell completion directories. +;;; + +(define bash-completion-dir + ;; The standard directory for installing bash completions. + ;; https://github.com/scop/bash-completion?tab=readme-ov-file#faq + "/share/bash-completion/completions/") + +(define fish-completion-dir + ;; The standard directory for installing fish completions. + ;; https://fishshell.com/docs/current/completions.html#where-to-put-completions + "/share/fish/vendor_completions.d/") + +(define zsh-completion-dir + ;; The standard directory for installing zsh completions. + "/share/zsh/site-functions/") + +(define elvish-completion-dir + ;; The standard directory for installing elvish completions. + "/share/elvish/lib/") + +(define nu-completion-dir + ;; The standard directory for installing nushell completions. + "/share/nushell/vendor/autoload/") + ;;; ;;; String comparison.