> I’ll never be in a position where a script is subtly broken because it’s running in zsh instead of bash
I would set the hashbang to "#!/usr/bin/env bash" and then bail out if $BASH_VERSION isn't set on the first line, while also naming the script "foo.bash" (rather than foo.sh).
This way you can "enforce" a specific interpreter. Scripts using #!/bin/sh while relying on bash features was a common annoyance when I used FreeBSD – although it's probably less common now that some Linuxes have started using dash and /bin/sh. I don't mind if people use bash, but please make it explicit, especially because these types of errors are not necessarily obvious to the user.
I would set the hashbang to "#!/usr/bin/env bash" and then bail out if $BASH_VERSION isn't set on the first line, while also naming the script "foo.bash" (rather than foo.sh).
This way you can "enforce" a specific interpreter. Scripts using #!/bin/sh while relying on bash features was a common annoyance when I used FreeBSD – although it's probably less common now that some Linuxes have started using dash and /bin/sh. I don't mind if people use bash, but please make it explicit, especially because these types of errors are not necessarily obvious to the user.