[PATCH] gnu: gita: Install shell completions.

  • Done
  • quality assurance status badge
Details
2 participants
  • Oleg Pykhalov
  • Michael Rohleder
Owner
unassigned
Submitted by
Michael Rohleder
Severity
normal

Debbugs page

Michael Rohleder wrote 4 years ago
(address . guix-patches@gnu.org)(name . Michael Rohleder)(address . mike@rohleder.de)
20201208012203.31133-1-mike@rohleder.de
* 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(-)

Toggle diff (35 lines)
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
Oleg Pykhalov wrote 4 years ago
(name . Michael Rohleder)(address . mike@rohleder.de)(address . 45110-done@debbugs.gnu.org)
87lfe898xc.fsf@gmail.com
Hello.

Awesome, thank you!


Small addition. As described in discussion [1] we don't need to return
a boolean in phases.

Toggle diff (14 lines)
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
Pushed to master.

Oleg.
-----BEGIN PGP SIGNATURE-----

iQJIBAEBCgAyFiEEcjhxI46s62NFSFhXFn+OpQAa+pwFAl/PC48UHGdvLndpZ3Vz
dEBnbWFpbC5jb20ACgkQFn+OpQAa+pw0qw//XerobZFK7Ak5VcsTT5MWMmyymJTa
7CVutHtD9WPOcKKO6VTqnx79hvHjdUX45IPKPN4SNXNsd5JiClNxHzh8uD4BYi3f
jktxEtsoYm8rdJfduAxYXGskV/wOD4fAiWJEGqD8oWY09xVREtLhGHMNSqTe6YWt
72MMaSN5W1sGzDWBEW7c1it2a5qCMaXn1y/lQkLGJ7xc2j9pykz47OQ3mMK1JyGR
LxWMhbMiuemN7tH3xlUUcq/vip+/Jw+XHr82s1sGl/oITbosFsSmwbdT+Yahxnki
qo9EuxhwR4xKgnAdXAu759MMa6aOKr/C+coMPU8jj9jY6qmVIAkq68eks9KkdxxD
pHV0Snz3Vxx8Pija4D+mI4/zmgVL61L/v5lZj7Z0+/48g4Rt4Bv+Ww3TWqNvXVJe
kUBOvu/0XjIAc5YuuailxhhKjcmzSgdJJMJN9ZVJDOJ9UoVidtXwrRX6X+VB4iIF
yLt9aOGv50ko17g0celZmqWvrA9yCLXN6AD9URogD2jFU92bKuumd+AsxdB+iY5M
9NabiUC3AtQrYsNj7rWgRYK077uKnq6SeIAxLpgNxBunVNLTtxNPHehc1umnlTZm
KUGSD5oqoqEvY0s51+wmiBsiPZT/N6EhQbgYQEWyYQftshhRe2TvpSlaCCNUbph8
ccS2vfoIyiq+JFU=
=+lTE
-----END PGP SIGNATURE-----

Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 45110@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 45110
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help