Set fzf options according to the version

This commit is contained in:
gardouille 2022-02-22 14:36:46 +01:00
parent 5c6b4d46a9
commit d895e2ab2a
Signed by: gardouille
GPG Key ID: E759BAA22501AF32
1 changed files with 7 additions and 1 deletions

8
zshrc
View File

@ -1806,7 +1806,13 @@ if [ -f ~/bin/fd ]; then
export FZF_DEFAULT_COMMAND='fd --type f'
fi
export FZF_DEFAULT_OPTS="--cycle --multi --select-1 --bind change:first"
autoload is-at-least
if is-at-least 0.29.0 $(fzf --version); then
export FZF_DEFAULT_OPTS="--cycle --multi --select-1 --bind change:first"
else
## change:first is unknown in FZF before 0.29.0
export FZF_DEFAULT_OPTS="--cycle --multi --select-1"
fi
# Auto-completion
# ---------------