helm/zsh/fzf

22 lines
535 B
Plaintext
Raw Normal View History

2015-12-21 00:11:28 -08:00
local fzf_path="/usr/local/opt/fzf"
2015-12-22 00:56:36 -08:00
if [[ ! -d "$fzf_path" && -d "$HOME/.fzf" ]]; then
fzf_path="$HOME/.fzf"
else
return
fi
2015-12-21 00:11:28 -08:00
export FZF_DEFAULT_COMMAND='ag -g ""'
export FZF_DEFAULT_OPTS='--reverse --inline-info'
if [[ ! "$PATH" == *$fzf_path/bin* ]]; then
export PATH="$PATH:$fzf_path/bin"
fi
if [[ ! "$MANPATH" == *$fzf_path/man* && -d "$fzf_path/man" ]]; then
export MANPATH="$MANPATH:$fzf_path/man"
fi
is-interactive && source "$fzf_path/shell/completion.zsh" 2> /dev/null
source "$fzf_path/shell/key-bindings.zsh"