From d895e2ab2a6d8fc230d992462de06e48f78f9179 Mon Sep 17 00:00:00 2001 From: Gardouille Date: Tue, 22 Feb 2022 14:36:46 +0100 Subject: [PATCH] Set fzf options according to the version --- zshrc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/zshrc b/zshrc index 7c7cb6d..11875c4 100644 --- a/zshrc +++ b/zshrc @@ -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 # ---------------