guix-commits
[Top][All Lists]
Advanced

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

01/01: gnu: password-store: Install bash completions.


From: Marius Bakke
Subject: 01/01: gnu: password-store: Install bash completions.
Date: Tue, 17 Jan 2017 15:19:05 +0000 (UTC)

mbakke pushed a commit to branch master
in repository guix.

commit 718c12786b3df914594a7b225e661a071f06c908
Author: Marius Bakke <address@hidden>
Date:   Tue Jan 17 16:15:13 2017 +0100

    gnu: password-store: Install bash completions.
    
    * gnu/packages/password-utils.scm (password-store)[arguments]: Add
    'install-shell-completions' phase.
---
 gnu/packages/password-utils.scm |   12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/password-utils.scm b/gnu/packages/password-utils.scm
index cb8dacc..feb6848 100644
--- a/gnu/packages/password-utils.scm
+++ b/gnu/packages/password-utils.scm
@@ -294,7 +294,17 @@ any X11 window.")
                               '("coreutils" "getopt" "git" "gnupg" "pwgen"
                                 "sed" "tree" "which" "xclip"))))
                (wrap-program (string-append out "/bin/pass")
-                 `("PATH" ":" prefix (,(string-join path ":"))))))))
+                 `("PATH" ":" prefix (,(string-join path ":"))))
+               #t)))
+         (add-after 'wrap-path 'install-shell-completions
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out      (assoc-ref outputs "out"))
+                    (bashcomp (string-append out "/etc/bash_completion.d")))
+               ;; TODO: install fish and zsh completions.
+               (mkdir-p bashcomp)
+               (copy-file "src/completion/pass.bash-completion"
+                          (string-append bashcomp "/pass"))
+               #t))))
        #:make-flags (list "CC=gcc" (string-append "PREFIX=" %output))
        ;; Parallel tests may cause a race condition leading to a
        ;; timeout in some circumstances.



reply via email to

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