GNU bug report logs - #45500
[PATCH] gnu: borg: Install shell completions.

Previous Next

Package: guix-patches;

Reported by: Michael Rohleder <mike <at> rohleder.de>

Date: Mon, 28 Dec 2020 13:37:02 UTC

Severity: normal

Tags: patch

Done: Leo Famulari <leo <at> famulari.name>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Michael Rohleder <mike <at> rohleder.de>
To: 45500 <at> debbugs.gnu.org
Cc: Michael Rohleder <mike <at> rohleder.de>
Subject: [bug#45500] [PATCH] gnu: borg: Install shell completions.
Date: Mon, 28 Dec 2020 14:36:22 +0100
* 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 <m.othacehe <at> gmail.com>
 ;;; Copyright © 2020 Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
 ;;; Copyright © 2020 Marcin Karpezo <sirmacik <at> wioo.waw.pl>
+;;; Copyright © 2020 Michael Rohleder <mike <at> rohleder.de>
 ;;;
 ;;; 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





This bug report was last modified 4 years and 222 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.