mirror of
https://github.com/notwa/rc
synced 2024-05-18 09:53:22 -07:00
fix handling of directory names starting with a hyphen
This commit is contained in:
parent
8e551a54c3
commit
38cd399bcf
|
@ -19,7 +19,7 @@ decently() ( ### @-
|
|||
finder() { find "$dir" -type f "$@" '!' -path '*/.git/*' -print -quit; }
|
||||
[ -n "$1" ] || { printf '%s: missing directory argument\n' decently >&2; return 1; }
|
||||
for arg; do
|
||||
dir="$(readlink -f "$arg")" || continue
|
||||
dir="$(readlink -f -- "$arg")" || continue
|
||||
[ -d "$dir" ] || { printf '%s: not a directory: %s\n' decently "$dir" >&2; continue; }
|
||||
prev=
|
||||
latest="$(finder)" || continue
|
||||
|
|
Loading…
Reference in New Issue
Block a user