* [bug#45110] [PATCH] gnu: gita: Install shell completions.
@ 2020-12-08 1:22 Michael Rohleder
2020-12-08 5:13 ` bug#45110: " Oleg Pykhalov
0 siblings, 1 reply; 2+ messages in thread
From: Michael Rohleder @ 2020-12-08 1:22 UTC (permalink / raw)
To: 45110; +Cc: Michael Rohleder
* gnu/packages/version-control.scm (gita)[arguments]: Add phase
install-shell-completions.
---
gnu/packages/version-control.scm | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index a3588009c0..95d6c220c0 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -31,6 +31,7 @@
;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2020 Vinicius Monego <monego@posteo.net>
;;; Copyright © 2020 Tanguy Le Carrour <tanguy@bioneland.org>
+;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -2947,7 +2948,19 @@ defects faster.")
(add-installed-pythonpath inputs outputs)
(invoke (string-append (assoc-ref inputs "python-pytest")
"/bin/pytest")
- "-vv" "tests"))))))
+ "-vv" "tests")))
+ (add-after 'install 'install-shell-completions
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bash-completion (string-append out "/etc/bash_completion.d"))
+ (zsh-completion (string-append out "/etc/zsh/site-functions")))
+ (mkdir-p bash-completion)
+ (copy-file ".gita-completion.bash"
+ (string-append bash-completion "/gita"))
+ (mkdir-p zsh-completion)
+ (copy-file ".gita-completion.zsh"
+ (string-append zsh-completion "/_gita"))
+ #t))))))
(home-page "https://github.com/nosarthur/gita")
(synopsis "Command-line tool to manage multiple Git repos")
(description "This package provides a command-line tool to manage
--
2.29.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* bug#45110: [PATCH] gnu: gita: Install shell completions.
2020-12-08 1:22 [bug#45110] [PATCH] gnu: gita: Install shell completions Michael Rohleder
@ 2020-12-08 5:13 ` Oleg Pykhalov
0 siblings, 0 replies; 2+ messages in thread
From: Oleg Pykhalov @ 2020-12-08 5:13 UTC (permalink / raw)
To: Michael Rohleder; +Cc: 45110-done
[-- Attachment #1.1: Type: text/plain, Size: 197 bytes --]
Hello.
Awesome, thank you!
Small addition. As described in discussion [1] we don't need to return
a boolean in phases.
[1] https://lists.gnu.org/archive/html/guix-devel/2020-11/msg00585.html
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: phases no longer returning a Boolean --]
[-- Type: text/x-patch, Size: 768 bytes --]
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 95d6c220c0..8504c8b006 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -2959,8 +2959,7 @@ defects faster.")
(string-append bash-completion "/gita"))
(mkdir-p zsh-completion)
(copy-file ".gita-completion.zsh"
- (string-append zsh-completion "/_gita"))
- #t))))))
+ (string-append zsh-completion "/_gita"))))))))
(home-page "https://github.com/nosarthur/gita")
(synopsis "Command-line tool to manage multiple Git repos")
(description "This package provides a command-line tool to manage
[-- Attachment #1.3: Type: text/plain, Size: 26 bytes --]
Pushed to master.
Oleg.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 861 bytes --]
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-12-08 5:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-08 1:22 [bug#45110] [PATCH] gnu: gita: Install shell completions Michael Rohleder
2020-12-08 5:13 ` bug#45110: " Oleg Pykhalov
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).