Update fzf conf
This commit is contained in:
parent
968e39fb03
commit
e4253b4af4
19
bash/fzf
19
bash/fzf
|
@ -1,20 +1,27 @@
|
||||||
|
local fzf_path="/usr/local/opt/fzf"
|
||||||
|
if [[ ! -d "$fzf_path" && -d "$HOME/.fzf" ]]; then
|
||||||
|
fzf_path="$HOME/.fzf"
|
||||||
|
else
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
# Setup fzf
|
# Setup fzf
|
||||||
# ---------
|
# ---------
|
||||||
if [[ ! "$PATH" == */usr/local/opt/fzf/bin* ]]; then
|
if [[ ! "$PATH" == *$fzf_path/bin* ]]; then
|
||||||
export PATH="$PATH:/usr/local/opt/fzf/bin"
|
export PATH="$PATH:$fzf_path/bin"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Man path
|
# Man path
|
||||||
# --------
|
# --------
|
||||||
if [[ ! "$MANPATH" == */usr/local/opt/fzf/man* && -d "/usr/local/opt/fzf/man" ]]; then
|
if [[ ! "$MANPATH" == *$fzf_path/man* && -d "$fzf_path/man" ]]; then
|
||||||
export MANPATH="$MANPATH:/usr/local/opt/fzf/man"
|
export MANPATH="$MANPATH:$fzf_path/man"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Auto-completion
|
# Auto-completion
|
||||||
# ---------------
|
# ---------------
|
||||||
[[ $- == *i* ]] && source "/usr/local/opt/fzf/shell/completion.bash" 2> /dev/null
|
[[ $- == *i* ]] && source "$fzf_path/shell/completion.bash" 2> /dev/null
|
||||||
|
|
||||||
# Key bindings
|
# Key bindings
|
||||||
# ------------
|
# ------------
|
||||||
source "/usr/local/opt/fzf/shell/key-bindings.bash"
|
source "$fzf_path/shell/key-bindings.bash"
|
||||||
|
|
||||||
|
|
5
zsh/fzf
5
zsh/fzf
|
@ -1,4 +1,9 @@
|
||||||
local fzf_path="/usr/local/opt/fzf"
|
local fzf_path="/usr/local/opt/fzf"
|
||||||
|
if [[ ! -d "$fzf_path" && -d "$HOME/.fzf" ]]; then
|
||||||
|
fzf_path="$HOME/.fzf"
|
||||||
|
else
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
export FZF_DEFAULT_COMMAND='ag -g ""'
|
export FZF_DEFAULT_COMMAND='ag -g ""'
|
||||||
export FZF_DEFAULT_OPTS='--reverse --inline-info'
|
export FZF_DEFAULT_OPTS='--reverse --inline-info'
|
||||||
|
|
Loading…
Reference in a new issue