]> arthur.barton.de Git - ax-zsh.git/blob - plugins/fzf/fzf.zshrc
4e46e9f5cc16b92bfaeb14d24ef6cb4e629b1de6
[ax-zsh.git] / plugins / fzf / fzf.zshrc
1 # AX-ZSH: Alex' Modular ZSH Configuration
2 # fzf.zshrc: Setup Git
3
4 axzsh_is_modern_terminal || return 91
5
6 # Test for local fzf installation ...
7 if [[ -r ~/.fzf.zsh ]]; then
8         source ~/.fzf.zsh
9         return 0
10 fi
11
12 # Make sure that "fzf(1)" is installed
13 (( $+commands[fzf] )) || return 1
14
15 # Test for Debian-specific keybinding location ...
16 if [[ -r /usr/share/doc/fzf/examples/key-bindings.zsh ]]; then
17         source /usr/share/zsh/vendor-completions/_fzf
18         source /usr/share/doc/fzf/examples/key-bindings.zsh
19         return 0
20 fi
21
22 # Search for and read in FZF ZSH integration files
23 for dir (
24         /usr/local/lib/fzf/shell
25         /usr/local/opt/fzf/shell
26         /opt/fzf/shell
27 ); do
28         [[ -d "$dir" ]] || continue
29         source "$dir/completion.zsh"
30         source "$dir/key-bindings.zsh"
31         return 0
32 done
33 return 1