spam-ascii: pass -L to find so it dereferences ~/ascii when symlinked
Some checks failed
Close stale issues / stale (push) Has been cancelled

~/ascii is a symlink to ~/.yadr/ascii. Without -L, 'find <symlink>'
treats the link itself as the starting point, -type f rules it out,
and fuzzy matches return nothing.
This commit is contained in:
2026-04-21 10:01:08 -07:00
parent 4813512731
commit 079bee5774

View File

@@ -32,8 +32,10 @@ for candidate in \
fi
done
# 3. First case-insensitive substring match.
match=$(find "$dir" -maxdepth 1 -type f -iname "*$pattern*" 2>/dev/null \
# 3. First case-insensitive substring match. -L so find follows a possible
# symlink starting point (e.g. ~/ascii -> ~/.yadr/ascii); without it, find
# treats the symlink itself as the "starting point" and ignores -type f.
match=$(find -L "$dir" -maxdepth 1 -type f -iname "*$pattern*" 2>/dev/null \
| sort \
| head -n1)