From 88717ab6db79245cf29f3c382d0ef8a45096603f Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Wed, 11 May 2022 23:07:10 +0200 Subject: zshrec: adjust fzf integration for Homebrew --- .zsh/zshrc/99_fzf | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/.zsh/zshrc/99_fzf b/.zsh/zshrc/99_fzf index 86086ee..82f4aa7 100644 --- a/.zsh/zshrc/99_fzf +++ b/.zsh/zshrc/99_fzf @@ -6,10 +6,16 @@ # # Source repository: git://git.distanz.ch/dotfiles/zsh.git -path_append $HOME/.fzf/bin +FZF="${HOME}/.fzf" +# Installed using Homebrew +[ -d $FZF ] || FZF="/usr/local/opt/fzf" -# Auto-completion -[[ $- == *i* ]] && source "${HOME}/.fzf/shell/completion.zsh" 2> /dev/null +if [ -d $FZF ] ; then + path_append $FZF/bin -# Key bindings -source "${HOME}/.fzf/shell/key-bindings.zsh" + # Auto-completion + [[ $- == *i* ]] && source "${FZF}/shell/completion.zsh" 2> /dev/null + + # Key bindings + source "${FZF}/shell/key-bindings.zsh" +fi -- cgit v1.2.3-54-g00ecf