zprofile: Refactor FZF_DEFAULT_COMMAND fallback

Group all names that are pruned in parentheses, but remove the unneeded
parentheses around `-type f -print` by removing the `-a`.
This commit is contained in:
2022-09-19 12:05:52 +02:00
parent ec292c0dd1
commit 83ae0c1642

View File

@@ -95,10 +95,10 @@ if (( $+commands[rg] )); then
# Also respect gitignores # Also respect gitignores
FZF_DEFAULT_COMMAND="rg --hidden --files -g '!.git'" FZF_DEFAULT_COMMAND="rg --hidden --files -g '!.git'"
else else
FZF_DEFAULT_COMMAND="find ." FZF_DEFAULT_COMMAND="find . \("
FZF_DEFAULT_COMMAND+=" -name '.git' -prune -o" FZF_DEFAULT_COMMAND+=" -name '.git' -o"
FZF_DEFAULT_COMMAND+=" -name 'node_modules' -prune -o" FZF_DEFAULT_COMMAND+=" -name 'node_modules'"
FZF_DEFAULT_COMMAND+=" \( -type f -a -print \)" FZF_DEFAULT_COMMAND+=" \) -prune -o -type f -print"
fi fi
export FZF_DEFAULT_COMMAND export FZF_DEFAULT_COMMAND