[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
12/12: gnu: just: Install shell completions.
From: |
guix-commits |
Subject: |
12/12: gnu: just: Install shell completions. |
Date: |
Thu, 28 Sep 2023 14:18:19 -0400 (EDT) |
efraim pushed a commit to branch master
in repository guix.
commit 36094ba02106aac27c464a9ebb1b9d34f017315d
Author: Efraim Flashner <efraim@flashner.co.il>
AuthorDate: Thu Sep 28 21:08:32 2023 +0300
gnu: just: Install shell completions.
* gnu/packages/rust-apps.scm (just)[arguments]: Add a phase to install
the shell completions.
---
gnu/packages/rust-apps.scm | 23 ++++++++++++++++++++++-
1 file changed, 22 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/rust-apps.scm b/gnu/packages/rust-apps.scm
index 7a5760a396..894173b7dd 100644
--- a/gnu/packages/rust-apps.scm
+++ b/gnu/packages/rust-apps.scm
@@ -806,7 +806,28 @@ bar. It is also compatible with sway.")
(lambda* (#:key outputs #:allow-other-keys)
(install-file "man/just.1"
(string-append (assoc-ref outputs "out")
- "/share/man/man1")))))))
+ "/share/man/man1"))))
+ (add-after 'install 'install-completions
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (share (string-append out "/share"))
+ (just (string-append out "/bin/just")))
+ (mkdir-p (string-append share "/bash-completion/completions"))
+ (with-output-to-file
+ (string-append share "/bash-completion/completions/just")
+ (lambda _ (invoke just "--completions" "bash")))
+ (mkdir-p (string-append share "/fish/vendor_completions.d"))
+ (with-output-to-file
+ (string-append share "/fish/vendor_completions.d/just.fish")
+ (lambda _ (invoke just "--completions" "fish")))
+ (mkdir-p (string-append share "/zsh/site-functions"))
+ (with-output-to-file
+ (string-append share "/zsh/site-functions/_just")
+ (lambda _ (invoke just "--completions" "zsh")))
+ (mkdir-p (string-append share "/elvish/lib"))
+ (with-output-to-file
+ (string-append share "/elvish/lib/just")
+ (lambda _ (invoke just "--completions" "elvish")))))))))
(home-page "https://github.com/casey/just")
(synopsis "Just a command runner")
(description "This package provides @code{just}, a command runner.
- 02/12: gnu: Add rust-snafu-derive-0.7., (continued)
- 02/12: gnu: Add rust-snafu-derive-0.7., guix-commits, 2023/09/28
- 01/12: gnu: Add rust-executable-path-1., guix-commits, 2023/09/28
- 03/12: gnu: Add rust-snafu-0.7., guix-commits, 2023/09/28
- 05/12: gnu: Add rust-strum-0.24., guix-commits, 2023/09/28
- 04/12: gnu: Add rust-lexiclean-0.0.1., guix-commits, 2023/09/28
- 06/12: gnu: Add rust-dotenvy-0.15., guix-commits, 2023/09/28
- 07/12: gnu: Add rust-cradle-0.2., guix-commits, 2023/09/28
- 08/12: gnu: Add rust-target-2., guix-commits, 2023/09/28
- 09/12: gnu: Add rust-temptree-0.2., guix-commits, 2023/09/28
- 11/12: gnu: just: Install manpage., guix-commits, 2023/09/28
- 12/12: gnu: just: Install shell completions.,
guix-commits <=
- 10/12: gnu: Add just., guix-commits, 2023/09/28