diff options
author | Dario Vladović <d.vladimyr@gmail.com> | 2021-03-15 22:34:47 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-15 22:34:47 +0100 |
commit | 90bdb8a1561b8eef759c8e46a31845265f8cb9b9 (patch) | |
tree | 0fcd13a26ab83be21fc70879d2f4ece5ff9871f1 /plugins/fzf/fzf.plugin.zsh | |
parent | 9d556cd5458aba76dc4ab09bc53f53f2a1893ce9 (diff) | |
download | zsh-90bdb8a1561b8eef759c8e46a31845265f8cb9b9.tar.gz zsh-90bdb8a1561b8eef759c8e46a31845265f8cb9b9.tar.bz2 zsh-90bdb8a1561b8eef759c8e46a31845265f8cb9b9.zip |
feat(fzf): add support for Termux package (#9718)
Diffstat (limited to 'plugins/fzf/fzf.plugin.zsh')
-rw-r--r-- | plugins/fzf/fzf.plugin.zsh | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/plugins/fzf/fzf.plugin.zsh b/plugins/fzf/fzf.plugin.zsh index 524089983..69ec1d411 100644 --- a/plugins/fzf/fzf.plugin.zsh +++ b/plugins/fzf/fzf.plugin.zsh @@ -64,11 +64,21 @@ function setup_using_debian_package() { # NOTE: There is no need to configure PATH for debian package, all binaries # are installed to /usr/bin by default - # Determine completion file path: first bullseye/sid, then buster/stretch - local completions="/usr/share/doc/fzf/examples/completion.zsh" - [[ -f "$completions" ]] || completions="/usr/share/zsh/vendor-completions/_fzf" - - local key_bindings="/usr/share/doc/fzf/examples/key-bindings.zsh" + local completions key_bindings + + case $PREFIX in + *com.termux*) + # Support Termux package + completions="${PREFIX}/share/fzf/completion.zsh" + key_bindings="${PREFIX}/share/fzf/key-bindings.zsh" + ;; + *) + # Determine completion file path: first bullseye/sid, then buster/stretch + completions="/usr/share/doc/fzf/examples/completion.zsh" + [[ -f "$completions" ]] || completions="/usr/share/zsh/vendor-completions/_fzf" + key_bindings="/usr/share/doc/fzf/examples/key-bindings.zsh" + ;; + esac # Auto-completion if [[ -o interactive && "$DISABLE_FZF_AUTO_COMPLETION" != "true" ]]; then |