fzf: Use rg instead of find when installed
Use rg as it respects possible gitignores.
This commit is contained in:
@@ -57,7 +57,12 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Show also hidden files per default but ignore files in '.git' directories.
|
# Show also hidden files per default but ignore files in '.git' directories.
|
||||||
FZF_DEFAULT_COMMAND="find . -name '.git' -prune -o \( -type f -a -print \)"
|
if command -v rg &>/dev/null; then
|
||||||
|
# Also respect gitignores
|
||||||
|
FZF_DEFAULT_COMMAND="rg --hidden --files -g '!.git'"
|
||||||
|
else
|
||||||
|
FZF_DEFAULT_COMMAND="find . -name '.git' -prune -o \( -type f -a -print \)"
|
||||||
|
fi
|
||||||
export FZF_DEFAULT_COMMAND
|
export FZF_DEFAULT_COMMAND
|
||||||
|
|
||||||
# Setup LS_COLORS
|
# Setup LS_COLORS
|
||||||
|
|||||||
Reference in New Issue
Block a user