-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathfzf.plugin.zsh
22 lines (18 loc) · 1.01 KB
/
fzf.plugin.zsh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh
if command -v fzf &> /dev/null; then
[ -f /usr/share/fzf/shell/key-bindings.zsh ] && source /usr/share/fzf/shell/key-bindings.zsh
[ -f /usr/share/fzf/completion.zsh ] && source /usr/share/fzf/completion.zsh
[ -f /usr/share/fzf/key-bindings.zsh ] && source /usr/share/fzf/key-bindings.zsh
[ -f /usr/share/doc/fzf/examples/completion.zsh ] && source /usr/share/doc/fzf/examples/completion.zsh
[ -f /usr/share/doc/fzf/examples/key-bindings.zsh ] && source /usr/share/doc/fzf/examples/key-bindings.zsh
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
if [[ "$(uname -s)" == "Darwin" && "$(command -v brew)" != "" ]] ; then
local FZF_HOME=$(brew --prefix)/opt/fzf
[ -f $FZF_HOME/shell/completion.zsh ] && source $FZF_HOME/shell/completion.zsh
[ -f $FZF_HOME/shell/key-bindings.zsh ] && source $FZF_HOME/shell/key-bindings.zsh
fi
if [ -n "${commands[fzf-share]}" ]; then
source "$(fzf-share)/key-bindings.zsh"
source "$(fzf-share)/completion.zsh"
fi
fi