Don't look in hidden directories

This commit is contained in:
David Heinemeier Hansson
2026-05-08 15:41:15 +02:00
parent 0e6e292348
commit 8757b2e1a4
+7 -4
View File
@@ -30,16 +30,19 @@ for path in "${paths[@]}"; do
[[ -e $path ]] || { echo "Path not found: $path" >&2; exit 1; }
done
find_args=("${paths[@]}" -type f "(")
find_args=("${paths[@]}" "(" -type d -name ".*" ! -name "." -prune ")" -o -type f "(")
first_format=true
for format in "${formats[@]}"; do
if (( ${#find_args[@]} > ${#paths[@]} + 3 )); then
if [[ $first_format == "true" ]]; then
first_format=false
else
find_args+=(-o)
fi
format="${format#.}"
find_args+=(-iname "*.$format")
done
find_args+=(")")
find_args+=(")" -printf '%T@\t%p\n')
find "${find_args[@]}" -printf '%T@\t%p\n' 2>/dev/null | sort -rn | cut -f2- |
find "${find_args[@]}" 2>/dev/null | sort -rn | cut -f2- |
omarchy-launch-walker --dmenu --width 800 --minheight 1 --maxheight 500 -p "$label…" "$@" 2>/dev/null