Files
heartwood/scripts/just/commit-msg.sh
T
Lorenz Leutgeb c7d71df4ab scripts, build, just: POSIX Compliance
Enforce POSIX shell syntax with ShellCheck using `--shell sh`.
2026-10-30 12:45:40 +01:00

17 lines
370 B
Bash
Executable File

#! /usr/bin/env sh
set -euo pipefail
FILE=$1
while ! typos "$FILE"; do \
exec < /dev/tty; \
echo ""; \
printf "%sTypos found.%s (e)dit, (c)ontinue, or (a)bort? [E/c/a] " "${WARN}" "${NORMAL}"; \
read -r response; \
case "$response" in \
[cC]*) exit 0 ;; \
[aA]*) exit 1 ;; \
*) ${EDITOR:-nano} "$FILE" ;; \
esac; \
done