This teaches `--on-signal SIGINT` (and by extension `trap cmd SIGINT`) to work properly in scripts, not just interactively. Note any such function will suppress the default behavior of exiting. Do this for SIGTERM as well.