2024.03.04

https://news.ycombinator.com/item?id=39568728

  • set -x
  • trap read DEBUG
  • trap 'read -p "[$BASH_SOURCE:$LINENO] $BASH_COMMAND"' DEBUG
  • die() { echo $1 >&2; exit 1; }, some_command || die "oh no!"