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