90bdb8a1561b8eef759c8e46a31845265f8cb9b9
- Author
- Dario Vladović <d.vladimyr@gmail.com>
- Committer
- GitHub <noreply@github.com>
- Date
Message
feat(fzf): add support for Termux package (#9718)
Diff
1diff --git a/plugins/fzf/fzf.plugin.zsh b/plugins/fzf/fzf.plugin.zsh
2index 52408998392b66cf19714c16e6cab10ebe125aea..69ec1d4114b0b2e85c8636adaaa9784e010b37f9 100644
3--- a/plugins/fzf/fzf.plugin.zsh
4+++ b/plugins/fzf/fzf.plugin.zsh
5@@ -64,11 +64,21 @@ function setup_using_debian_package() {
6 # NOTE: There is no need to configure PATH for debian package, all binaries
7 # are installed to /usr/bin by default
8
9- # Determine completion file path: first bullseye/sid, then buster/stretch
10- local completions="/usr/share/doc/fzf/examples/completion.zsh"
11- [[ -f "$completions" ]] || completions="/usr/share/zsh/vendor-completions/_fzf"
12-
13- local key_bindings="/usr/share/doc/fzf/examples/key-bindings.zsh"
14+ local completions key_bindings
15+
16+ case $PREFIX in
17+ *com.termux*)
18+ # Support Termux package
19+ completions="${PREFIX}/share/fzf/completion.zsh"
20+ key_bindings="${PREFIX}/share/fzf/key-bindings.zsh"
21+ ;;
22+ *)
23+ # Determine completion file path: first bullseye/sid, then buster/stretch
24+ completions="/usr/share/doc/fzf/examples/completion.zsh"
25+ [[ -f "$completions" ]] || completions="/usr/share/zsh/vendor-completions/_fzf"
26+ key_bindings="/usr/share/doc/fzf/examples/key-bindings.zsh"
27+ ;;
28+ esac
29
30 # Auto-completion
31 if [[ -o interactive && "$DISABLE_FZF_AUTO_COMPLETION" != "true" ]]; then