emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#45110: closed ([PATCH] gnu: gita: Install shell completions.)


From: GNU bug Tracking System
Subject: bug#45110: closed ([PATCH] gnu: gita: Install shell completions.)
Date: Tue, 08 Dec 2020 05:15:02 +0000

Your message dated Tue, 08 Dec 2020 08:13:51 +0300
with message-id <87lfe898xc.fsf@gmail.com>
and subject line Re: [bug#45110] [PATCH] gnu: gita: Install shell completions.
has caused the debbugs.gnu.org bug report #45110,
regarding [PATCH] gnu: gita: Install shell completions.
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
45110: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=45110
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: [PATCH] gnu: gita: Install shell completions. Date: Tue, 8 Dec 2020 02:22:03 +0100
* 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




--- End Message ---
--- Begin Message --- Subject: Re: [bug#45110] [PATCH] gnu: gita: Install shell completions. Date: Tue, 08 Dec 2020 08:13:51 +0300 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
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

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.

Attachment: signature.asc
Description: PGP signature


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]