[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/03: gnu: tig: Install shell completions.
From: |
guix-commits |
Subject: |
02/03: gnu: tig: Install shell completions. |
Date: |
Mon, 18 Jul 2022 06:59:54 -0400 (EDT) |
efraim pushed a commit to branch master
in repository guix.
commit 4ca19e88de3dd634b08a5c08dbb3d6e9957dbe83
Author: Efraim Flashner <efraim@flashner.co.il>
AuthorDate: Mon Jul 18 13:22:15 2022 +0300
gnu: tig: Install shell completions.
* gnu/packages/version-control.scm (tig)[arguments]: Add custom phase to
install shell completions.
---
gnu/packages/version-control.scm | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 62c2e452d1..2848bcb146 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -2458,7 +2458,17 @@ from Subversion to any supported Distributed Version
Control System (DVCS).")
(modify-phases %standard-phases
(add-after 'install 'install-doc
(lambda _
- (invoke "make" "install-doc"))))
+ (invoke "make" "install-doc")))
+ (add-after 'install 'install-completions
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (share (string-append out "/share")))
+ (mkdir-p (string-append share "/bash-completion/completions"))
+ (mkdir-p (string-append share "/zsh/site-functions"))
+ (copy-file "contrib/tig-completion.bash"
+ (string-append share
"/bash-completion/completions/tig"))
+ (copy-file "contrib/tig-completion.zsh"
+ (string-append share "/zsh/site-functions/_tig"))))))
#:test-target "test"
#:tests? #f)) ; tests require access to /dev/tty
(home-page "https://jonas.github.io/tig/")