From 2434b85ceb1ebcec083c00d9df37620bc452530a Mon Sep 17 00:00:00 2001 From: bretello Date: Fri, 25 Oct 2024 10:41:44 +0200 Subject: [PATCH] zsh: account for (devel) fzf versions when checking the installed version --- brethil_dotfile.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/brethil_dotfile.sh b/brethil_dotfile.sh index 6e99a43..57eb723 100755 --- a/brethil_dotfile.sh +++ b/brethil_dotfile.sh @@ -65,7 +65,7 @@ else export FZF_CTRL_T_COMMAND='find' fi export FZF_CTRL_T_OPTS=" --preview-window=right,60% --preview \"bash -c 'if [[ -d \"{}\" ]]; then tree -C \"{}\"; else bat --style=plain --color=always \"{}\"; fi'\" --bind 'ctrl-/:change-preview-window(right,70%|down,40%,border-horizontal|hidden|right)'" -if [[ $(fzf --version | cut -d. -f 2) -ge 52 ]]; then +if [[ $(fzf --version | cut -d " " -f 1 | cut -d. -f 2) -ge 52 ]]; then # only available for fzf 0.52.0+ https://github.com/junegunn/fzf/releases/tag/0.52.0 export FZF_DEFAULT_OPTS="$FZF_DEFAULT_OPTS --highlight-line" fi