Just discovered two useful features commonly available in shells:
1. printf "%q" 'thing!'
The %q sequence in the printf commands transforms an argument in a quoted version (see screenshot)
2. disown
This one is a builtin in bash and zsh, but not in dash. It disowns the last background job and, with that, closing the shell won't kill the disowned job. I'm using this for an opener script.
(I know printf isn't a shell builtin, but it is available in most systems, I guess)
AFAICT, %q is specific to the CLI printf, so things like dash and BusyBox probably error out because their printf(1) just hands off to glibc's printf(3).
It wouldn't surprise me if the same implementation decision is also at play in all the non-GNU, non-Zsh stuff on the BSDs, macOS, and Solaris.
(After all, it *is* kind of nonsensical and counter-intuitive to have two separate implementations of printf formatting in the same userland rather than just putting %q into glibc.)