guix-patches
[Top][All Lists]
Advanced

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

[bug#48643] PATCH] gnu: fzf: Add fish shell functions to the package.


From: Solene Rapenne
Subject: [bug#48643] PATCH] gnu: fzf: Add fish shell functions to the package.
Date: Tue, 25 May 2021 10:16:50 +0200

This allows to enable fzf functions for fish using the following code in
the file ~/.config/fish/config.fish 

source ~/.guix-profile/share/fish/functions/fzf
fzf_key_bindings


---
 gnu/packages/terminals.scm | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/gnu/packages/terminals.scm b/gnu/packages/terminals.scm
index 37636c7cdc..5273dce005 100644
--- a/gnu/packages/terminals.scm
+++ b/gnu/packages/terminals.scm
@@ -25,6 +25,7 @@
 ;;; Copyright © 2020 Leo Famulari <leo@famulari.name>
 ;;; Copyright © 2021 Ekaitz Zarraga <ekaitz@elenq.tech>
 ;;; Copyright © 2021 Raphaël Mélotte <raphael.melotte@mind.be>
+;;; Copyright © 2021 Solene Rapenne <solene@perso.pw>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -851,11 +852,15 @@ usable with any list--including files, command history, 
processes and more.")
             (lambda* (#:key outputs #:allow-other-keys)
               (let* ((out (assoc-ref outputs "out"))
                      (bash-completion (string-append out 
"/etc/bash_completion.d"))
+                     (fish-completion (string-append out 
"/share/fish/functions"))
                      (zsh-completion (string-append out 
"/share/zsh/site-functions")))
                 (with-directory-excursion "src/github.com/junegunn/fzf"
                   (mkdir-p bash-completion)
                   (copy-file "shell/completion.bash"
                              (string-append bash-completion "/fzf"))
+                  (mkdir-p fish-completion)
+                  (copy-file "shell/key-bindings.fish"
+                             (string-append fish-completion "/fzf"))
                   (mkdir-p zsh-completion)
                   (copy-file "shell/completion.zsh"
                              (string-append zsh-completion "/_fzf"))))))))))
-- 
2.31.1






reply via email to

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