]> arthur.barton.de Git - ax-zsh.git/blobdiff - plugins/fzf/fzf.zshrc
axzshctl: Implement "--help" option, and ehnance error handling
[ax-zsh.git] / plugins / fzf / fzf.zshrc
index 84fe95c4dee2899491e20a6b6597940c6aff1e2f..4e46e9f5cc16b92bfaeb14d24ef6cb4e629b1de6 100644 (file)
@@ -1,15 +1,33 @@
 # AX-ZSH: Alex' Modular ZSH Configuration
 # fzf.zshrc: Setup Git
 
+axzsh_is_modern_terminal || return 91
+
+# Test for local fzf installation ...
+if [[ -r ~/.fzf.zsh ]]; then
+       source ~/.fzf.zsh
+       return 0
+fi
+
 # Make sure that "fzf(1)" is installed
-(( $+commands[fzf] )) || return
+(( $+commands[fzf] )) || return 1
+
+# Test for Debian-specific keybinding location ...
+if [[ -r /usr/share/doc/fzf/examples/key-bindings.zsh ]]; then
+       source /usr/share/zsh/vendor-completions/_fzf
+       source /usr/share/doc/fzf/examples/key-bindings.zsh
+       return 0
+fi
 
 # Search for and read in FZF ZSH integration files
 for dir (
+       /usr/local/lib/fzf/shell
        /usr/local/opt/fzf/shell
+       /opt/fzf/shell
 ); do
        [[ -d "$dir" ]] || continue
        source "$dir/completion.zsh"
        source "$dir/key-bindings.zsh"
-       break
+       return 0
 done
+return 1