Unverified Commit f96a900e authored by Carlo Sala's avatar Carlo Sala Committed by GitHub

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.
parent af0c3b64
...@@ -31,8 +31,8 @@ export FZF_DEFAULT_COMMAND='<your fzf default command>' ...@@ -31,8 +31,8 @@ export FZF_DEFAULT_COMMAND='<your fzf default command>'
If not set, the plugin will try to set it to these, in the order in which they're found: If not set, the plugin will try to set it to these, in the order in which they're found:
- [`rg`](https://github.com/BurntSushi/ripgrep)
- [`fd`](https://github.com/sharkdp/fd) - [`fd`](https://github.com/sharkdp/fd)
- [`rg`](https://github.com/BurntSushi/ripgrep)
- [`ag`](https://github.com/ggreer/the_silver_searcher) - [`ag`](https://github.com/ggreer/the_silver_searcher)
### `DISABLE_FZF_AUTO_COMPLETION` ### `DISABLE_FZF_AUTO_COMPLETION`
......
...@@ -191,10 +191,10 @@ fzf_setup_using_openbsd \ ...@@ -191,10 +191,10 @@ fzf_setup_using_openbsd \
unset -f -m 'fzf_setup_*' unset -f -m 'fzf_setup_*'
if [[ -z "$FZF_DEFAULT_COMMAND" ]]; then if [[ -z "$FZF_DEFAULT_COMMAND" ]]; then
if (( $+commands[rg] )); then if (( $+commands[fd] )); then
export FZF_DEFAULT_COMMAND='rg --files --hidden --glob "!.git/*"'
elif (( $+commands[fd] )); then
export FZF_DEFAULT_COMMAND='fd --type f --hidden --exclude .git' 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 elif (( $+commands[ag] )); then
export FZF_DEFAULT_COMMAND='ag -l --hidden -g "" --ignore .git' export FZF_DEFAULT_COMMAND='ag -l --hidden -g "" --ignore .git'
fi fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment