diff --git a/config/scripts/.local/scripts/ghostty-capture b/config/scripts/.local/scripts/ghostty-capture index de7929f..f64cee5 100755 --- a/config/scripts/.local/scripts/ghostty-capture +++ b/config/scripts/.local/scripts/ghostty-capture @@ -25,11 +25,19 @@ file=${1:-$(wl-paste --no-newline)} exit 1 } -[ -e "$file" ] || { +[ -f "$file" ] || { echo "File does not exist: $file" >&2 exit 1 } +case "$file" in + /tmp/*/*.txt) ;; + *) + echo "Possibily not a Ghostty generated temp file: $file" >&2 + exit 1 + ;; +esac + ${EDITOR:-vim} "$file" rm -f "$file"