From fb483305f5ad0621aeaba2ad4a85c8a904f60502 Mon Sep 17 00:00:00 2001 From: srdusr Date: Thu, 16 May 2024 15:48:51 +0200 Subject: Testing fzf sourcing (key-bindings & completion) --- .config/zsh/.zshrc | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc index aca362f..e3e8425 100644 --- a/.config/zsh/.zshrc +++ b/.config/zsh/.zshrc @@ -43,8 +43,16 @@ stty start undef #source /usr/share/nvm/init-nvm.sh # Load fzf keybindings and completion -source /usr/local/bin/fzf/shell/key-bindings.zsh -source /usr/local/bin/fzf/shell/completion.zsh +#source /usr/local/bin/fzf/shell/key-bindings.zsh +#source /usr/local/bin/fzf/shell/completion.zsh + +if command -v fzf > /dev/null 2>&1; then + FZF_BASE=$(dirname $(dirname $(which fzf))) + source "${FZF_BASE}/shell/key-bindings.zsh" + source "${FZF_BASE}/shell/completion.zsh" +else + echo "fzf not found, please install it to use fzf keybindings and completion." +fi # Suggest aliases for commands source ~/.config/zsh/plugins/zsh-you-should-use/you-should-use.plugin.zsh -- cgit v1.2.3