From ee09c88ac2b600f795cfc9870c64cbdc7e6a72d3 Mon Sep 17 00:00:00 2001 From: Eric Torres Date: Tue, 14 Nov 2023 00:25:02 -0800 Subject: [PATCH] Automate the versioning of fzf when opening completions --- zsh-macos/.config/zsh-macos/fzf.zsh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/zsh-macos/.config/zsh-macos/fzf.zsh b/zsh-macos/.config/zsh-macos/fzf.zsh index 30439c4..4eb1a0a 100644 --- a/zsh-macos/.config/zsh-macos/fzf.zsh +++ b/zsh-macos/.config/zsh-macos/fzf.zsh @@ -1,10 +1,11 @@ # Setup fzf # --------- +fzf_version="$(fzf --version | cut -d ' ' -f1 | tr -d '[:space:]')" # Auto-completion # --------------- -[[ $- == *i* ]] && source "/usr/local/Cellar/fzf/0.43.0/shell/completion.zsh" +[[ $- == *i* ]] && source "/usr/local/Cellar/fzf/${fzf_version}/shell/completion.zsh" # Key bindings # ------------ -source "/usr/local/Cellar/fzf/0.43.0/shell/key-bindings.zsh" +source "/usr/local/Cellar/fzf/${fzf_version}/shell/key-bindings.zsh"