mirror of
https://github.com/robbyrussell/oh-my-zsh.git
synced 2025-12-06 07:20:40 +01:00
fzf: setup FZF_DEFAULT_COMMAND based on installed tools (#8895)
Co-authored-by: Marc Cornellà <marc.cornella@live.com>
This commit is contained in:
committed by
GitHub
parent
415be382ca
commit
708ea42384
@@ -98,3 +98,13 @@ function indicate_error() {
|
||||
setup_using_debian_package || setup_using_base_dir || indicate_error
|
||||
|
||||
unset -f setup_using_debian_package setup_using_base_dir indicate_error
|
||||
|
||||
if [[ -z "$FZF_DEFAULT_COMMAND" ]]; then
|
||||
if (( $+commands[rg] )); then
|
||||
export FZF_DEFAULT_COMMAND='rg --files --hidden'
|
||||
elif (( $+commands[fd] )); then
|
||||
export FZF_DEFAULT_COMMAND='fd --type f --hidden --exclude .git'
|
||||
elif (( $+commands[ag] )); then
|
||||
export FZF_DEFAULT_COMMAND='ag -l --hidden -g ""'
|
||||
fi
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user