]> arthur.barton.de Git - ax-zsh.git/blob - plugins/fzf/fzf.zshrc
fzf: Look for fzf(1) in /opt/fzf, too
[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 # Search for and read in FZF ZSH integration files
14 for dir (
15         /usr/local/lib/fzf/shell
16         /usr/local/opt/fzf/shell
17         /opt/fzf/shell
18 ); do
19         [[ -d "$dir" ]] || continue
20         source "$dir/completion.zsh"
21         source "$dir/key-bindings.zsh"
22         return 0
23 done
24 return 1