diff options
author | Carlo Sala <carlosalag@protonmail.com> | 2022-03-05 19:18:56 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-05 19:18:56 +0100 |
commit | f96a900ea3f33868310749aaf4e5a68b3118e621 (patch) | |
tree | 32ab69eb817d312fd2deb11ecd08857a82807b30 /plugins | |
parent | af0c3b64b8c7eb6afcdabc8db89241ff72bcc66a (diff) | |
download | zsh-f96a900ea3f33868310749aaf4e5a68b3118e621.tar.gz zsh-f96a900ea3f33868310749aaf4e5a68b3118e621.tar.bz2 zsh-f96a900ea3f33868310749aaf4e5a68b3118e621.zip |
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.
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/fzf/README.md | 2 | ||||
-rw-r--r-- | plugins/fzf/fzf.plugin.zsh | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/plugins/fzf/README.md b/plugins/fzf/README.md index 15d4d31f3..beedf4690 100644 --- a/plugins/fzf/README.md +++ b/plugins/fzf/README.md @@ -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: -- [`rg`](https://github.com/BurntSushi/ripgrep) - [`fd`](https://github.com/sharkdp/fd) +- [`rg`](https://github.com/BurntSushi/ripgrep) - [`ag`](https://github.com/ggreer/the_silver_searcher) ### `DISABLE_FZF_AUTO_COMPLETION` diff --git a/plugins/fzf/fzf.plugin.zsh b/plugins/fzf/fzf.plugin.zsh index 102605958..b86af0d2d 100644 --- a/plugins/fzf/fzf.plugin.zsh +++ b/plugins/fzf/fzf.plugin.zsh @@ -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 |