GNU bug report logs -
#77181
[PATCH 0/5] gnu: Fix bash completion directories.
Previous Next
To reply to this bug, email your comments to 77181 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#77181
; Package
guix-patches
.
(Sat, 22 Mar 2025 15:06:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
45mg <45mg.writes <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Sat, 22 Mar 2025 15:06:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
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
--
2.49.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#77181
; Package
guix-patches
.
(Sat, 22 Mar 2025 15:09:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 77181 <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/password-utils.scm (pass-age) [arguments]: Change
etc/bash-completion.d to etc/bash_completion.d.
Change-Id: I6ed77cff28a1fb7305d8a0357026e518dcc0e11a
---
gnu/packages/password-utils.scm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gnu/packages/password-utils.scm b/gnu/packages/password-utils.scm
index bce4af8e5f..035b4d8886 100644
--- a/gnu/packages/password-utils.scm
+++ b/gnu/packages/password-utils.scm
@@ -879,7 +879,7 @@ (define-public pass-age
#:install-plan
'(("src/passage" "/bin/")
("src/completion/pass.bash-completion"
- "/etc/bash-completion.d/passage")
+ "/etc/bash_completion.d/passage")
("src/completion/pass.fish-completion"
"/share/fish/vendor_completions.d/passage")
("src/completion/pass.zsh-completion"
--
2.49.0
Information forwarded
to
divya <at> subvertising.org, efraim <at> flashner.co.il, steve <at> futurile.net, guix-patches <at> gnu.org
:
bug#77181
; Package
guix-patches
.
(Sat, 22 Mar 2025 15:09:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 77181 <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/rust-apps.scm (ouch) [arguments]: Change
etc/bash-completion.d to etc/bash_completion.d.
Change-Id: I63f2be695e9d8dc15de61bbbb470c54e47a6a197
---
gnu/packages/rust-apps.scm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gnu/packages/rust-apps.scm b/gnu/packages/rust-apps.scm
index 2f933d836c..b7eb4a5bbc 100644
--- a/gnu/packages/rust-apps.scm
+++ b/gnu/packages/rust-apps.scm
@@ -2349,7 +2349,7 @@ (define-public ouch
(let* ((out (assoc-ref outputs "out"))
(share (string-append out "/share"))
(bash-completions-dir
- (string-append out "/etc/bash-completion.d"))
+ (string-append out "/etc/bash_completion.d"))
(zsh-completions-dir
(string-append share "/zsh/site-functions"))
(fish-completions-dir
--
2.49.0
Information forwarded
to
divya <at> subvertising.org, efraim <at> flashner.co.il, steve <at> futurile.net, guix-patches <at> gnu.org
:
bug#77181
; Package
guix-patches
.
(Sat, 22 Mar 2025 15:09:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 77181 <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/rust-apps.scm (git-delta) [arguments]: Change
etc/bash-completion.d to etc/bash_completion.d.
Change-Id: I7825607cc15df5b6fec8322740d303b38842e401
---
gnu/packages/rust-apps.scm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gnu/packages/rust-apps.scm b/gnu/packages/rust-apps.scm
index b7eb4a5bbc..6766260040 100644
--- a/gnu/packages/rust-apps.scm
+++ b/gnu/packages/rust-apps.scm
@@ -4561,7 +4561,7 @@ (define-public git-delta
(let* ((out (assoc-ref outputs "out"))
(share (string-append out "/share"))
(bash-completions-dir
- (string-append out "/etc/bash-completion.d"))
+ (string-append out "/etc/bash_completion.d"))
(zsh-completions-dir
(string-append share "/zsh/site-functions"))
(fish-completions-dir
--
2.49.0
Information forwarded
to
divya <at> subvertising.org, efraim <at> flashner.co.il, steve <at> futurile.net, guix-patches <at> gnu.org
:
bug#77181
; Package
guix-patches
.
(Sat, 22 Mar 2025 15:09:03 GMT)
Full text and
rfc822 format available.
Message #17 received at 77181 <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/rust-apps.scm (zoxide) [arguments]: Change
etc/bash-completion.d to etc/bash_completion.d.
Change-Id: I55f1a9f5c37a6b795f0021ea8b08f472c16847e9
---
gnu/packages/rust-apps.scm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gnu/packages/rust-apps.scm b/gnu/packages/rust-apps.scm
index 6766260040..0b19d36fdb 100644
--- a/gnu/packages/rust-apps.scm
+++ b/gnu/packages/rust-apps.scm
@@ -4881,7 +4881,7 @@ (define-public zoxide
(share (string-append out "/share"))
(man1 (string-append share "/man/man1"))
(bash-completions-dir
- (string-append out "/etc/bash-completion.d"))
+ (string-append out "/etc/bash_completion.d"))
(zsh-completions-dir
(string-append share "/zsh/site-functions"))
(fish-completions-dir
--
2.49.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#77181
; Package
guix-patches
.
(Sat, 22 Mar 2025 15:09:03 GMT)
Full text and
rfc822 format available.
Message #20 received at 77181 <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/shellutils.scm (starship) [arguments]: Change
etc/bash-completion.d to etc/bash_completion.d.
Change-Id: Ie286218d636a56745013ebdb23461691fdf16d11
---
gnu/packages/shellutils.scm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gnu/packages/shellutils.scm b/gnu/packages/shellutils.scm
index 28c8af8685..3e3e04e8c1 100644
--- a/gnu/packages/shellutils.scm
+++ b/gnu/packages/shellutils.scm
@@ -499,7 +499,7 @@ (define-public starship
(string-append out "/bin/starship")))
(share (string-append out "/share"))
(bash-completion-dir
- (string-append out "/etc/bash-completion.d/"))
+ (string-append out "/etc/bash_completion.d/"))
(zsh-completion-dir
(string-append share "/zsh/site-functions/"))
(fish-completion-dir
--
2.49.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#77181
; Package
guix-patches
.
(Sat, 22 Mar 2025 16:38:02 GMT)
Full text and
rfc822 format available.
Message #23 received at 77181 <at> debbugs.gnu.org (full text, mbox):
Hi 45mg,
45mg <45mg.writes <at> 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
Information forwarded
to
guix-patches <at> gnu.org
:
bug#77181
; Package
guix-patches
.
(Sat, 22 Mar 2025 17:23:02 GMT)
Full text and
rfc822 format available.
Message #26 received at 77181 <at> debbugs.gnu.org (full text, mbox):
Hi Ian,
Ian Eure <ian <at> 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 <at> guix1 ]$ pkg-config --variable=completionsdir bash-completion
/gnu/store/5774mb64pqw93fpcchndiiq9fh80ngga-bash-completion-2.11/share/bash-completion/completions
[user <at> 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.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#77181
; Package
guix-patches
.
(Tue, 25 Mar 2025 15:10:01 GMT)
Full text and
rfc822 format available.
Message #29 received at 77181 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
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 <at> guix1 ]$ pkg-config --variable=completionsdir bash-completion
> /gnu/store/5774mb64pqw93fpcchndiiq9fh80ngga-bash-completion-2.11/share/bash-completion/completions
>
> [user <at> 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.
--
Efraim Flashner <efraim <at> 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
[guix-shell-completions.diff (text/plain, attachment)]
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#77181
; Package
guix-patches
.
(Tue, 25 Mar 2025 15:33:01 GMT)
Full text and
rfc822 format available.
Message #32 received at 77181 <at> debbugs.gnu.org (full text, mbox):
Efraim Flashner <efraim <at> 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 <at> 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.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#77181
; Package
guix-patches
.
(Thu, 27 Mar 2025 08:49:02 GMT)
Full text and
rfc822 format available.
Message #35 received at 77181 <at> debbugs.gnu.org (full text, mbox):
I added my patch to the series and then adjusted the patches to use
bash-completion-dir in all the spots. While I was at it I changed the
other completions too.
I made sure to add a comment from each shell completion's upstream
justifying the completion directory.
45mg (5):
gnu: pass-age: Fix shell completion directories.
gnu: ouch: Fix shell completion directories.
gnu: git-delta: Fix shell completion directories.
gnu: zoxide: Fix shell completion directories.
gnu: starship: Fix shell completion directories.
Efraim Flashner (1):
guix: Add shell completion directories.
gnu/packages/password-utils.scm | 8 ++---
gnu/packages/rust-apps.scm | 63 +++++++++++----------------------
gnu/packages/shellutils.scm | 27 +++++---------
guix/utils.scm | 38 +++++++++++++++++++-
4 files changed, 70 insertions(+), 66 deletions(-)
base-commit: eb30f5ecbea896e9cf93722bf97681d208f1a7be
--
Efraim Flashner <efraim <at> 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
Information forwarded
to
guix <at> cbaines.net, dev <at> jpoiret.xyz, ludo <at> gnu.org, othacehe <at> gnu.org, zimon.toutoune <at> gmail.com, me <at> tobias.gr, guix-patches <at> gnu.org
:
bug#77181
; Package
guix-patches
.
(Thu, 27 Mar 2025 08:49:03 GMT)
Full text and
rfc822 format available.
Message #38 received at 77181 <at> debbugs.gnu.org (full text, mbox):
* guix/utils.scm (bash-completion-dir, fish-completion-dir,
zsh-completion-dir, elvish-completion-dir, nu-completion-dir): New
variables.
Change-Id: I076bd26a87f196a32fb9542cd8058fc1d2a12aa9
---
guix/utils.scm | 38 +++++++++++++++++++++++++++++++++++++-
1 file changed, 37 insertions(+), 1 deletion(-)
diff --git a/guix/utils.scm b/guix/utils.scm
index c7c23d9d5ba..2108eff7a75 100644
--- a/guix/utils.scm
+++ b/guix/utils.scm
@@ -7,7 +7,7 @@
;;; Copyright © 2015 David Thompson <davet <at> gnu.org>
;;; Copyright © 2017 Mathieu Othacehe <m.othacehe <at> gmail.com>
;;; Copyright © 2018, 2020 Marius Bakke <marius <at> gnu.org>
-;;; Copyright © 2020, 2021, 2024 Efraim Flashner <efraim <at> flashner.co.il>
+;;; Copyright © 2020, 2021, 2024, 2025 Efraim Flashner <efraim <at> flashner.co.il>
;;; Copyright © 2020, 2021, 2022 Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
;;; Copyright © 2021 Simon Tournier <zimon.toutoune <at> gmail.com>
;;; Copyright © 2021 Chris Marusich <cmmarusich <at> gmail.com>
@@ -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,36 @@ (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.
+ ;; https://github.com/z-shell/wiki/blob/main/ecosystem/plugins/zsh_navigation_tools.mdx#install-zsh-navigation-tools
+ "/share/zsh/site-functions/")
+
+(define elvish-completion-dir
+ ;; The standard directory for installing elvish completions.
+ ;; https://elv.sh/ref/command.html#module-search-directories
+ "/share/elvish/lib/")
+
+(define nu-completion-dir
+ ;; The standard directory for installing nushell completions.
+ ;; https://www.nushell.sh/book/configuration.html#startup-variables
+ "/share/nushell/vendor/autoload/")
+
;;;
;;; String comparison.
--
Efraim Flashner <efraim <at> 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
Information forwarded
to
guix-patches <at> gnu.org
:
bug#77181
; Package
guix-patches
.
(Thu, 27 Mar 2025 08:50:04 GMT)
Full text and
rfc822 format available.
Message #41 received at 77181 <at> debbugs.gnu.org (full text, mbox):
From: 45mg <45mg.writes <at> gmail.com>
* gnu/packages/password-utils.scm (pass-age) [arguments]: Use the shell
completion directory variables.
Change-Id: I6ed77cff28a1fb7305d8a0357026e518dcc0e11a
---
gnu/packages/password-utils.scm | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/gnu/packages/password-utils.scm b/gnu/packages/password-utils.scm
index bce4af8e5f0..23fa82a2e54 100644
--- a/gnu/packages/password-utils.scm
+++ b/gnu/packages/password-utils.scm
@@ -845,7 +845,7 @@ (define-public pass-age
(base32 "1ap2i08zjvacd2rllrsx9bw3zz5i99bk0i5yxrssvn6w60bwjqdl"))))
(build-system copy-build-system)
(arguments
- '(#:modules
+ `(#:modules
((guix build copy-build-system)
(guix build utils)
(srfi srfi-26))
@@ -879,11 +879,11 @@ (define-public pass-age
#:install-plan
'(("src/passage" "/bin/")
("src/completion/pass.bash-completion"
- "/etc/bash-completion.d/passage")
+ ,(string-append bash-completion-dir "passage"))
("src/completion/pass.fish-completion"
- "/share/fish/vendor_completions.d/passage")
+ ,(string-append fish-completion-dir "passage"))
("src/completion/pass.zsh-completion"
- "/share/zsh/site-functions/_passage"))))
+ ,(string-append zsh-completion-dir "_passage")))))
(inputs
(list age coreutils-minimal git-minimal
procps qrencode sed tree util-linux))
--
Efraim Flashner <efraim <at> 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
Information forwarded
to
divya <at> subvertising.org, efraim <at> flashner.co.il, steve <at> futurile.net, guix-patches <at> gnu.org
:
bug#77181
; Package
guix-patches
.
(Thu, 27 Mar 2025 08:50:07 GMT)
Full text and
rfc822 format available.
Message #44 received at 77181 <at> debbugs.gnu.org (full text, mbox):
From: 45mg <45mg.writes <at> gmail.com>
* gnu/packages/rust-apps.scm (ouch) [arguments]: Use the shell
completion directory variables.
Change-Id: I63f2be695e9d8dc15de61bbbb470c54e47a6a197
---
gnu/packages/rust-apps.scm | 20 ++++++--------------
1 file changed, 6 insertions(+), 14 deletions(-)
diff --git a/gnu/packages/rust-apps.scm b/gnu/packages/rust-apps.scm
index 2f933d836c5..0371fd4c264 100644
--- a/gnu/packages/rust-apps.scm
+++ b/gnu/packages/rust-apps.scm
@@ -2348,25 +2348,17 @@ (define-public ouch
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(share (string-append out "/share"))
- (bash-completions-dir
- (string-append out "/etc/bash-completion.d"))
- (zsh-completions-dir
- (string-append share "/zsh/site-functions"))
- (fish-completions-dir
- (string-append share "/fish/vendor_completions.d"))
- (elvish-completions-dir
- (string-append share "/elvish/lib"))
(man1 (string-append share "/man/man1")))
- (mkdir-p bash-completions-dir)
- (mkdir-p elvish-completions-dir)
+ (mkdir-p (string-append out ,bash-completion-dir))
+ (mkdir-p (string-append out ,elvish-completion-dir))
(copy-file "target/ouch.bash"
- (string-append bash-completions-dir "/ouch"))
+ (string-append out ,bash-completion-dir "ouch"))
(install-file "target/_ouch"
- (string-append zsh-completions-dir "/_ouch"))
+ (string-append out ,zsh-completion-dir))
(install-file "target/ouch.fish"
- fish-completions-dir)
+ (string-append out ,fish-completion-dir))
(copy-file "target/ouch.elv"
- (string-append elvish-completions-dir "/ouch"))
+ (string-append out ,elvish-completion-dir "ouch"))
(for-each (lambda (manpage)
(install-file manpage man1))
(find-files "target" "\\.1$"))))))))
--
Efraim Flashner <efraim <at> 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
Information forwarded
to
divya <at> subvertising.org, efraim <at> flashner.co.il, steve <at> futurile.net, guix-patches <at> gnu.org
:
bug#77181
; Package
guix-patches
.
(Thu, 27 Mar 2025 08:50:10 GMT)
Full text and
rfc822 format available.
Message #47 received at 77181 <at> debbugs.gnu.org (full text, mbox):
From: 45mg <45mg.writes <at> gmail.com>
* gnu/packages/rust-apps.scm (git-delta) [arguments]: Use the shell
completion directory variables.
Change-Id: I7825607cc15df5b6fec8322740d303b38842e401
---
gnu/packages/rust-apps.scm | 21 +++++++--------------
1 file changed, 7 insertions(+), 14 deletions(-)
diff --git a/gnu/packages/rust-apps.scm b/gnu/packages/rust-apps.scm
index 0371fd4c264..55861ecc924 100644
--- a/gnu/packages/rust-apps.scm
+++ b/gnu/packages/rust-apps.scm
@@ -4550,23 +4550,16 @@ (define-public git-delta
#~(modify-phases %standard-phases
(add-after 'install 'install-extras
(lambda* (#:key outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (share (string-append out "/share"))
- (bash-completions-dir
- (string-append out "/etc/bash-completion.d"))
- (zsh-completions-dir
- (string-append share "/zsh/site-functions"))
- (fish-completions-dir
- (string-append share "/fish/vendor_completions.d")))
- (mkdir-p bash-completions-dir)
- (mkdir-p zsh-completions-dir)
- (mkdir-p fish-completions-dir)
+ (let ((out (assoc-ref outputs "out")))
+ (mkdir-p (string-append out #$bash-completion-dir))
+ (mkdir-p (string-append out #$fish-completion-dir))
+ (mkdir-p (string-append out #$zsh-completion-dir))
(copy-file "etc/completion/completion.bash"
- (string-append bash-completions-dir "/delta"))
+ (string-append out #$bash-completion-dir "/delta"))
(copy-file "etc/completion/completion.zsh"
- (string-append zsh-completions-dir "/_delta"))
+ (string-append out #$zsh-completion-dir "/_delta"))
(copy-file "etc/completion/completion.fish"
- (string-append fish-completions-dir "/delta.fish"))))))))
+ (string-append out #$fish-completion-dir "/delta.fish"))))))))
(native-inputs (list git-minimal pkg-config))
(inputs (list libgit2-1.7 openssl zlib))
(home-page "https://github.com/dandavison/delta")
--
Efraim Flashner <efraim <at> 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
Information forwarded
to
divya <at> subvertising.org, efraim <at> flashner.co.il, steve <at> futurile.net, guix-patches <at> gnu.org
:
bug#77181
; Package
guix-patches
.
(Thu, 27 Mar 2025 08:50:13 GMT)
Full text and
rfc822 format available.
Message #50 received at 77181 <at> debbugs.gnu.org (full text, mbox):
From: 45mg <45mg.writes <at> gmail.com>
* gnu/packages/rust-apps.scm (zoxide) [arguments]: Use the shell
completion directory variables.
Change-Id: I55f1a9f5c37a6b795f0021ea8b08f472c16847e9
---
gnu/packages/rust-apps.scm | 22 +++++++---------------
1 file changed, 7 insertions(+), 15 deletions(-)
diff --git a/gnu/packages/rust-apps.scm b/gnu/packages/rust-apps.scm
index 55861ecc924..48fefd3064a 100644
--- a/gnu/packages/rust-apps.scm
+++ b/gnu/packages/rust-apps.scm
@@ -4864,30 +4864,22 @@ (define-public zoxide
(lambda _
(let* ((out #$output)
(share (string-append out "/share"))
- (man1 (string-append share "/man/man1"))
- (bash-completions-dir
- (string-append out "/etc/bash-completion.d"))
- (zsh-completions-dir
- (string-append share "/zsh/site-functions"))
- (fish-completions-dir
- (string-append share "/fish/vendor_completions.d"))
- (elvish-completions-dir
- (string-append share "/elvish/lib")))
+ (man1 (string-append share "/man/man1")))
;; The completions are generated in build.rs.
(mkdir-p man1)
- (mkdir-p bash-completions-dir)
- (mkdir-p elvish-completions-dir)
+ (mkdir-p (string-append out #$bash-completion-dir))
+ (mkdir-p (string-append out #$elvish-completion-dir))
(for-each (lambda (file)
(install-file file man1))
(find-files "man/man1"))
(copy-file "contrib/completions/zoxide.bash"
- (string-append bash-completions-dir "/zoxide"))
+ (string-append out #$bash-completion-dir "/zoxide"))
(install-file "contrib/completions/zoxide.fish"
- fish-completions-dir)
+ (string-append out #$fish-completion-dir))
(install-file "contrib/completions/_zoxide"
- zsh-completions-dir)
+ (string-append out #$zsh-completion-dir))
(copy-file "contrib/completions/zoxide.elv"
- (string-append elvish-completions-dir
+ (string-append out #$elvish-completion-dir
"/zoxide"))))))))
(home-page "https://github.com/ajeetdsouza/zoxide/")
(synopsis "Fast way to navigate your file system")
--
Efraim Flashner <efraim <at> 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
Information forwarded
to
guix-patches <at> gnu.org
:
bug#77181
; Package
guix-patches
.
(Thu, 27 Mar 2025 08:50:16 GMT)
Full text and
rfc822 format available.
Message #53 received at 77181 <at> debbugs.gnu.org (full text, mbox):
From: 45mg <45mg.writes <at> gmail.com>
* gnu/packages/shellutils.scm (starship) [arguments]: Use the shell
completion directory variables.
Change-Id: Ie286218d636a56745013ebdb23461691fdf16d11
---
gnu/packages/shellutils.scm | 27 +++++++++------------------
1 file changed, 9 insertions(+), 18 deletions(-)
diff --git a/gnu/packages/shellutils.scm b/gnu/packages/shellutils.scm
index 28c8af8685a..c7723cb2e04 100644
--- a/gnu/packages/shellutils.scm
+++ b/gnu/packages/shellutils.scm
@@ -496,33 +496,24 @@ (define-public starship
(starship-bin
(if #$(%current-target-system)
(search-input-file native-inputs "/bin/starship")
- (string-append out "/bin/starship")))
- (share (string-append out "/share"))
- (bash-completion-dir
- (string-append out "/etc/bash-completion.d/"))
- (zsh-completion-dir
- (string-append share "/zsh/site-functions/"))
- (fish-completion-dir
- (string-append share "/fish/vendor_completions.d/"))
- (elvish-completion-dir
- (string-append share "/elvish/lib")))
+ (string-append out "/bin/starship"))))
;; Make the directories
- (mkdir-p bash-completion-dir)
- (mkdir-p zsh-completion-dir)
- (mkdir-p fish-completion-dir)
- (mkdir-p elvish-completion-dir)
+ (mkdir-p (string-append out #$bash-completion-dir))
+ (mkdir-p (string-append out #$zsh-completion-dir))
+ (mkdir-p (string-append out #$fish-completion-dir))
+ (mkdir-p (string-append out #$elvish-completion-dir))
;; Use the built starship to generate the completions.
(with-output-to-file
- (string-append bash-completion-dir "/starship")
+ (string-append out #$bash-completion-dir "/starship")
(lambda _ (invoke starship-bin "completions" "bash")))
(with-output-to-file
- (string-append zsh-completion-dir "/_starship")
+ (string-append out #$zsh-completion-dir "/_starship")
(lambda _(invoke starship-bin "completions" "zsh")))
(with-output-to-file
- (string-append fish-completion-dir "/starship.fish")
+ (string-append out #$fish-completion-dir "/starship.fish")
(lambda _ (invoke starship-bin "completions" "fish")))
(with-output-to-file
- (string-append elvish-completion-dir "/starship")
+ (string-append out #$elvish-completion-dir "/starship")
(lambda _ (invoke starship-bin "completions" "elvish"))))))
;; Some tests require a writable home directory
(add-after 'unpack 'patch-test-shell
--
Efraim Flashner <efraim <at> 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
Information forwarded
to
guix-patches <at> gnu.org
:
bug#77181
; Package
guix-patches
.
(Tue, 01 Apr 2025 10:27:03 GMT)
Full text and
rfc822 format available.
Message #56 received at 77181 <at> debbugs.gnu.org (full text, mbox):
Hi Efraim,
Efraim Flashner <efraim <at> flashner.co.il> skribis:
> * guix/utils.scm (bash-completion-dir, fish-completion-dir,
> zsh-completion-dir, elvish-completion-dir, nu-completion-dir): New
> variables.
>
> Change-Id: I076bd26a87f196a32fb9542cd8058fc1d2a12aa9
I think (guix utils) is not the right place for this.
How about (gnu packages shells)? It’s OK *if and only if* these
variables are only referenced from thunked fields: ‘arguments’,
‘inputs’, etc.
Please also fully spell out the variant names:
‘bash-completion-directory’, etc. (info "(guix) Formatting Code").
Thanks,
Ludo’.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#77181
; Package
guix-patches
.
(Thu, 08 May 2025 09:10:01 GMT)
Full text and
rfc822 format available.
Message #59 received at 77181 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
I was away for most of April but now I'm back and can work on this
again.
On Tue, Apr 01, 2025 at 12:26:11PM +0200, Ludovic Courtès wrote:
> Hi Efraim,
>
> Efraim Flashner <efraim <at> flashner.co.il> skribis:
>
> > * guix/utils.scm (bash-completion-dir, fish-completion-dir,
> > zsh-completion-dir, elvish-completion-dir, nu-completion-dir): New
> > variables.
> >
> > Change-Id: I076bd26a87f196a32fb9542cd8058fc1d2a12aa9
>
> I think (guix utils) is not the right place for this.
>
> How about (gnu packages shells)? It’s OK *if and only if* these
> variables are only referenced from thunked fields: ‘arguments’,
> ‘inputs’, etc.
I searched the code for locations where we've been using these paths and
they're all inside gnu/packages.
Of the 5 shells, bash in in bash.scm, elvish isn't packaged, nushell is
in nushell.scm, and fish and zsh are in shells.scm. I'm not sure it
makes sense to put the variables in shells.scm, we almost exclusively
have packages in gnu/packages. The artwork repo has its own module at
guix/artwork and we moved the search paths to guix/search-paths so we
didn't have to import other modules to reuse search paths. I think
these are closer to search-paths.scm in that we would use the variable
without needing the package. At the same time they are kinda
search-paths for their specific shells, even if we don't need to declare
them with each shell.
> Please also fully spell out the variant names:
> ‘bash-completion-directory’, etc. (info "(guix) Formatting Code").
No problem.
--
Efraim Flashner <efraim <at> 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
[signature.asc (application/pgp-signature, inline)]
This bug report was last modified 99 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.