From 38cd399bcfa4106090a9b22315f9a1928a3975fb Mon Sep 17 00:00:00 2001 From: Connor Olding Date: Thu, 7 Oct 2021 13:05:39 -0700 Subject: [PATCH] fix handling of directory names starting with a hyphen --- sh/decently | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sh/decently b/sh/decently index 938ee5d..bbbe2c6 100644 --- a/sh/decently +++ b/sh/decently @@ -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