shtikl/shtikl.sh
Juhani Krekelä a5112fea3e Better error messages some shells
Some shells (e.g. bash and mksh) always include the empty variable in
the error produced by '?' in parameter expansion, even when the script
provides its own error message. Use a variable name that does not
potentially mislead users.
2026-03-25 19:58:47 +02:00

7 lines
215 B
Bash

error() {
# Afaict, ? in the parameter expansion is the only way to output text that
# is guaranteed-builtin in the POSIX shell
shtikl_runtime_error= : ${shtikl_runtime_error?${0##*/}: error: $*}
}
. ./lists.sh