Set fzf options according to the version

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

6
zshrc
View File

@ -1806,7 +1806,13 @@ if [ -f ~/bin/fd ]; then
export FZF_DEFAULT_COMMAND='fd --type f' export FZF_DEFAULT_COMMAND='fd --type f'
fi fi
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" 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 # Auto-completion
# --------------- # ---------------