Subject: bug#45500: closed (Re: [bug#45500] [PATCH] gnu: borg: Install shell completions.)

From: [email-masked] (GNU bug Tracking System)
Date: Wed, 30 Dec 2020 22:56:01 +0000

Your bug report

#45500: [PATCH] gnu: borg: Install shell completions.

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
45500: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=45500
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: [bug#45500] [PATCH] gnu: borg: Install shell completions.
From: Leo Famulari <[email-masked]>
To: Michael Rohleder <[email-masked]>
Cc: [email-masked]
Date: Wed, 30 Dec 2020 17:55:33 -0500
List-Id: <debbugs-submit.debbugs.gnu.org>

On Mon, Dec 28, 2020 at 02:36:22PM +0100, Michael Rohleder wrote:
> * gnu/packages/backup.scm (borg)[arguments]: Add phase to install shell completions.

Thanks! Pushed as 9d6863de245fc061f24693b58ce87e73fe299d31

Subject: [PATCH] gnu: borg: Install shell completions.
From: Michael Rohleder <[email-masked]>
To: [email-masked]
Cc: Michael Rohleder <[email-masked]>
Date: Mon, 28 Dec 2020 14:36:22 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

* gnu/packages/backup.scm (borg)[arguments]: Add phase to install shell completions.
---
 gnu/packages/backup.scm | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm
index 892b92dc2f..0db2c47b2d 100644
--- a/gnu/packages/backup.scm
+++ b/gnu/packages/backup.scm
@@ -17,6 +17,7 @@
 ;;; Copyright © 2019 Mathieu Othacehe <[email-masked]>
 ;;; Copyright © 2020 Nicolas Goaziou <[email-masked]>
 ;;; Copyright © 2020 Marcin Karpezo <[email-masked]>
+;;; Copyright © 2020 Michael Rohleder <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -670,6 +671,19 @@ detection, and lossless compression.")
                            "docs/misc/internals-picture.txt"
                            "docs/misc/prune-example.txt"))
                (copy-recursively "docs/man" man)
+               #t)))
+         (add-after 'install-docs 'install-shell-completions
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (etc (string-append out "/etc"))
+                    (share (string-append out "/share")))
+               (with-directory-excursion "scripts/shell_completions"
+                 (install-file "bash/borg"
+                               (string-append etc "/bash_completion.d"))
+                 (install-file "zsh/_borg"
+                               (string-append share "/zsh/site-functions"))
+                 (install-file "fish/borg.fish"
+                               (string-append share "/fish/vendor_completions.d")))
                #t))))))
     (native-inputs
      `(("python-cython" ,python-cython)
-- 
2.29.2