From 83ae0c164208289241b42519ecc39c8b5303bd35 Mon Sep 17 00:00:00 2001 From: Julian Prein Date: Mon, 19 Sep 2022 12:05:52 +0200 Subject: [PATCH] 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`. --- .config/zsh/.zprofile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.config/zsh/.zprofile b/.config/zsh/.zprofile index 3cce029..a4e0999 100644 --- a/.config/zsh/.zprofile +++ b/.config/zsh/.zprofile @@ -95,10 +95,10 @@ if (( $+commands[rg] )); then # Also respect gitignores FZF_DEFAULT_COMMAND="rg --hidden --files -g '!.git'" else - FZF_DEFAULT_COMMAND="find ." - FZF_DEFAULT_COMMAND+=" -name '.git' -prune -o" - FZF_DEFAULT_COMMAND+=" -name 'node_modules' -prune -o" - FZF_DEFAULT_COMMAND+=" \( -type f -a -print \)" + FZF_DEFAULT_COMMAND="find . \(" + FZF_DEFAULT_COMMAND+=" -name '.git' -o" + FZF_DEFAULT_COMMAND+=" -name 'node_modules'" + FZF_DEFAULT_COMMAND+=" \) -prune -o -type f -print" fi export FZF_DEFAULT_COMMAND