mirror of
https://github.com/robbyrussell/oh-my-zsh.git
synced 2025-12-06 07:20:40 +01:00
feat(fzf)!: default to using fd before rg (#10757)
BREAKING CHANGE: if both `fd` and `rg` are installed, default to using `fd`. This is the recommendation of the ripgrep author, and it's been found to be faster. If you want to force using `rg`, set the `FZF_DEFAULT_COMMAND` variable.
This commit is contained in:
@@ -191,10 +191,10 @@ fzf_setup_using_openbsd \
|
||||
unset -f -m 'fzf_setup_*'
|
||||
|
||||
if [[ -z "$FZF_DEFAULT_COMMAND" ]]; then
|
||||
if (( $+commands[rg] )); then
|
||||
export FZF_DEFAULT_COMMAND='rg --files --hidden --glob "!.git/*"'
|
||||
elif (( $+commands[fd] )); then
|
||||
if (( $+commands[fd] )); then
|
||||
export FZF_DEFAULT_COMMAND='fd --type f --hidden --exclude .git'
|
||||
elif (( $+commands[rg] )); then
|
||||
export FZF_DEFAULT_COMMAND='rg --files --hidden --glob "!.git/*"'
|
||||
elif (( $+commands[ag] )); then
|
||||
export FZF_DEFAULT_COMMAND='ag -l --hidden -g "" --ignore .git'
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user