From eab0a3d17e0b2a2485c4973eacc4eb041990d026 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yaroslav=20de=20la=20Pe=C3=B1a=20Smirnov?= Date: Fri, 12 Nov 2021 17:51:07 +0300 Subject: zsh: make plugins work in Debian --- dotfiles/.config/zsh/shortcuts | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'dotfiles/.config/zsh/shortcuts') diff --git a/dotfiles/.config/zsh/shortcuts b/dotfiles/.config/zsh/shortcuts index 70041dc..8faf7c5 100644 --- a/dotfiles/.config/zsh/shortcuts +++ b/dotfiles/.config/zsh/shortcuts @@ -30,8 +30,20 @@ alias testinet="ping -c2 example.com" # Fuzzy finder alias fzo='op "$(find . -type d -path "*/\.*" -prune -o -not -name ".*" -type f | fzf)"' -source /usr/share/fzf/completion.zsh -source /usr/share/fzf/key-bindings.zsh +if [ -f /usr/share/fzf/completion.zsh ]; then + # Arch/Artix + . /usr/share/fzf/completion.zsh +elif [ -f /usr/share/doc/fzf/examples/completion.zsh ]; then + # Debian + . /usr/share/doc/fzf/examples/completion.zsh +fi +if [ -f /usr/share/fzf/key-bindings.zsh ]; then + # Arch/Artix + . /usr/share/fzf/key-bindings.zsh +elif [ -f /usr/share/doc/fzf/examples/key-bindings.zsh ]; then + # Debian + . /usr/share/doc/fzf/examples/key-bindings.zsh +fi bindkey -r '^T' bindkey -r '\ec' bindkey '^F' fzf-file-widget -- cgit v1.2.3