PATCH] gnu: fzf: Add fish shell functions to the package.

  • Done
  • quality assurance status badge
Details
3 participants
  • wp1148917-web wp1148917-web
  • Efraim Flashner
  • Solene Rapenne
Owner
unassigned
Submitted by
Solene Rapenne
Severity
normal

Debbugs page

Solene Rapenne wrote 4 years ago
(address . guix-patches@gnu.org)
20210525101650.0706dd75@perso.pw
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(+)

Toggle diff (30 lines)
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
Efraim Flashner wrote 3 years ago
(name . Solene Rapenne)(address . solene@perso.pw)(address . 48643-done@debbugs.gnu.org)
YVBhT7S8avNeyZoQ@3900XT
I adjusted the fish completion path slightly to match the other
packages. Patch pushed!

--
Efraim Flashner <efraim@flashner.co.il> רנשלפ םירפא
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmFQYU8ACgkQQarn3Mo9
g1Hc1A/+Nx/V8Ix9R/P9HCUrYi+C1kcXIFWa1E0vikZxR7djHEYPClKyH4DxkPZl
tZCFwZVPlf+Wkeo4s1qCD3EvOR4Okk7JTxQs2WZj0QaDdxFT8C9sk1jdzdjlRwWo
KRbSt9fyS2GHaRS4xP3ovZCk1UEG7vp5uyNr0e1b4RuaWS5GnqRsMBH9QMjjV4oP
8nuY2dwnQv43io/qTGYLeyX8rdYnC53o9Y27iVc8YgJgg3dW57qEBQMnIeMKUyW+
sezrEjo9lPzhYGT7cwCxqshzNJM8mYTFdDjK+K9/CZIzuSsqAMJL9rw157MMp3AQ
HZ7AsVuYq0bx9VGN8BVhp/mRfTRSC66afKsuRXAd81qDAQ86e94gZRDYHv3lBdfn
1AraKv2Xam9xPNj5Z5Ib/Tm29S86/UtktA4PYbIuUQCYiIKmZkU7F86K5DNltfmK
VSF39Via7pS6NTbzneDXD+hQKlhxVGKfPe7t9mHQKK+ef9KePiat3mHz8OiqxLC/
hwh9pr8k0WtQYn+1x0vLl6+99jEayS4WL3+lZPuzWWCd0bNnKrq4WDzkKpijNadq
LUdi0B/J1i4L7iQOokzrYjhyehmXrMsEfzFuY5H2Z1NW2GxELqiViNnJR6zuYJvK
iJ6NCUdbxgm4SSnZAoiNvZyMn95vPO9tWsaRmVHKXlXalrIz4cM=
=ZmBZ
-----END PGP SIGNATURE-----


Closed
wp1148917-web wp1148917-web wrote 3 years ago
(name . 48643@debbugs.gnu.org)(address . 48643@debbugs.gnu.org)
1917298992.58524.1633207395967@ox.hosteurope.de
Efraim, there seems to be a bit of confusion about the nature of the installed file: It is NOT a completion, but code that sets fzf shell-hotkeys. This should become obvious if you look at the folder from the source: https://github.com/junegunn/fzf/tree/master/shell
The file should probably be installed to vendor_functions.d/ as e.g. Arch does it: https://wiki.archlinux.org/title/Fzf#fish
Efraim Flashner wrote 3 years ago
(name . wp1148917-web)(address . drwilly@drwilly.de)(address . 48643-done@debbugs.gnu.org)
YVmbZ88fgNWzSDlK@3900XT
On Sat, Oct 02, 2021 at 10:43:15PM +0200, wp1148917-web wp1148917-web wrote:
Toggle quote (3 lines)
> Efraim, there seems to be a bit of confusion about the nature of the installed file: It is NOT a completion, but code that sets fzf shell-hotkeys. This should become obvious if you look at the folder from the source: https://github.com/junegunn/fzf/tree/master/shell
> The file should probably be installed to vendor_functions.d/ as e.g. Arch does it: https://wiki.archlinux.org/title/Fzf#fish

First of all, thanks! I hadn't checked it too closely and relied on the
wording of 'fish completion'.

Checking the upstream documentation¹, Arch² and Debian³ the completions should
go in %output/share/fish/vendor_functions.d/fzf_key_bindings.fish, so
I've moved them there.


--
Efraim Flashner <efraim@flashner.co.il> רנשלפ םירפא
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmFZm2YACgkQQarn3Mo9
g1GKbhAAsOrngV7kp8bMUMJY92fN/jDdEMwQRdbXi83Isdwoq26RM/jK4ggf8ez3
bhK/oGwSGrkSeYxgo/qWZz4mMwNW4fpgldDHbNCaJLVOuaBfbJcnuBk5WaKfjfDj
1vk2kIGqbrH8tjUS5XFepHcTFvSvwrHltiVb8QyqC0jSdFiBSo6YOdTNZ9ywfcNW
cpT+mWtsNRSaPIhMpxSQ7lnqspF7NOECPdNKRred3GxgLAxS8aegOa1nrsdDr6od
KNtWOm8ZN+wArRpLWu5sRS851Q5PLq/zU3+ZfLWwIMGvvnbQjiPh2hgF6+rkhiyc
JLMQHTrZi0cldM0Bl7bGMl/WbzW+i88S0SiRcbmfcE53qVBQG+wvZz+ScIPI9qxv
JpnLnMr7B/Ie1jpqyxbtNbXaElLRu9ibNGVJsXakLP+D3jlE1g+9H58u2eJT9eJG
3HwkVAe91AhT0krPyzMQ6zy8FSmQAKa2A1ZByJfjkPU3gWdqNlusGX2p+f0+ca1z
Bp+ZVER6RBnLvCnfEOjUtIRpriek4FqV3z3FLsBMvck4lzHPL/EMx4aWsi/VRuYB
QUlII5Zh0gZckhGDvWbJqtevzdgATjNRGGen+d9kWCf4bzt2a1HWpEvTaJxvQqz+
AhD3ZKIqFUHd6nfv3002eawUPZR5Tx8bCV5fgpY9rS40X3ACbnk=
=5vfq
-----END PGP SIGNATURE-----


Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 48643@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 48643
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help