Use ripgrep for fzf first and then the silver searcher if it isn't available
This commit is contained in:
parent
39ae69891a
commit
516d837e19
1 changed files with 10 additions and 3 deletions
|
@ -96,10 +96,17 @@ if [ -e "${XDG_RUNTIME_DIR}/docker.sock" ]; then
|
||||||
export DOCKER_HOST="unix://${XDG_RUNTIME_DIR}/docker.sock"
|
export DOCKER_HOST="unix://${XDG_RUNTIME_DIR}/docker.sock"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if command -v fzf &> /dev/null && command -v ag &> /dev/null; then
|
if command -v fzf &> /dev/null; then
|
||||||
|
if command -v rg &> /dev/null; then
|
||||||
|
export FZF_DEFAULT_COMMAND="rg --files --hidden --follow --glob '!.git'"
|
||||||
|
elif command -v ag &> /dev/null; then
|
||||||
export FZF_DEFAULT_COMMAND='ag --skip-vcs-ignores --nocolor -g "" -l'
|
export FZF_DEFAULT_COMMAND='ag --skip-vcs-ignores --nocolor -g "" -l'
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "${FZF_DEFAULT_COMMAND}" ]; then
|
||||||
export FZF_CTRL_T_COMMAND="${FZF_DEFAULT_COMMAND}"
|
export FZF_CTRL_T_COMMAND="${FZF_DEFAULT_COMMAND}"
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
typeset -U path
|
typeset -U path
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue