Message ID | 20210525101650.0706dd75@perso.pw |
---|---|
State | Accepted |
Headers | show |
Series | [bug#48643] PATCH] gnu: fzf: Add fish shell functions to the package. | expand |
Context | Check | Description |
---|---|---|
cbaines/comparison | success | View comparision |
cbaines/git branch | success | View Git branch |
cbaines/applying patch | success | View Laminar job |
cbaines/issue | success | View issue |
I adjusted the fish completion path slightly to match the other packages. Patch pushed!
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
On Sat, Oct 02, 2021 at 10:43:15PM +0200, wp1148917-web wp1148917-web wrote: > 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. ¹ https://fishshell.com/docs/current/completions.html?highlight=vendor#where-to-put-completions ² https://wiki.archlinux.org/title/Fzf#fish ³ https://sources.debian.org/src/fzf/0.24.3-1/debian/fzf.install/
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"))))))))))