fzf: add zsh completions and fish keybindings (#7277)

This commit is contained in:
Pooya Moradi 2021-08-07 01:38:41 +04:30 committed by GitHub
parent 0521306c30
commit 3bf997224e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,6 +3,7 @@ TERMUX_PKG_DESCRIPTION="Command-line fuzzy finder"
TERMUX_PKG_LICENSE="MIT"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=0.27.2
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://github.com/junegunn/fzf/archive/${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=7798a9e22fc363801131456dc21026ccb0f037aed026d17df60b1178b3f24111
@ -44,13 +45,19 @@ termux_step_make_install() {
mkdir -p $TERMUX_PREFIX/share/man/man1/
cp $TERMUX_PKG_SRCDIR/man/man1/fzf.1 $TERMUX_PREFIX/share/man/man1/
# Install bash completion script:
mkdir -p $TERMUX_PREFIX/share/bash-completion/completions/
cp $TERMUX_PKG_SRCDIR/shell/completion.bash $TERMUX_PREFIX/share/bash-completion/completions/fzf
# Install the rest of the shell scripts:
mkdir -p $TERMUX_PREFIX/share/fzf
cp $TERMUX_PKG_SRCDIR/shell/* $TERMUX_PREFIX/share/fzf/
# Symlink shell completions.
mkdir -p $TERMUX_PREFIX/share/bash-completion/completions/
ln -sfr $TERMUX_PREFIX/share/fzf/completion.bash $TERMUX_PREFIX/share/bash-completion/completions/fzf
mkdir -p $TERMUX_PREFIX/share/zsh/site-functions
ln -sfr $TERMUX_PREFIX/share/fzf/completion.zsh $TERMUX_PREFIX/share/zsh/site-functions/_fzf
# Fish keybindings.
mkdir -p $TERMUX_PREFIX/share/fish/vendor_functions.d
ln -sfr $TERMUX_PREFIX/share/fzf/key-bindings.fish $TERMUX_PREFIX/share/fish/vendor_functions.d/fzf_key_bindings.fish
# Install the nvim plugin:
mkdir -p $TERMUX_PREFIX/share/nvim/runtime/plugin