Improve find command

This commit is contained in:
Yax 2026-05-04 19:33:07 +02:00
parent 99d70422c0
commit 8e4fed7c0f
2 changed files with 6 additions and 2 deletions

View file

@ -1,2 +1,6 @@
# no cache but more accurate than pj (https://github.com/josephschmitt/pj)
fd -H -d 7 -t d -E .git -E .gitlab . "{{ .projectdir }}" | awk '{ print length, $0 }' | sort -n | cut -d' ' -f2-
FD=$(command -v fdfind || command -v fd)
"$FD" -H -d 7 -t d -E .git -E .gitlab . "{{ .projectdir }}" \
| awk '{ print length, $0 }' \
| sort -n \
| cut -d' ' -f2-