Argc – A handy way to handle sh/bash CLI parameters
github.com
github.com
#!/usr/bin/env -S bash -c 'argc -e ${0} "${@}"'
Would be cleaner if there was mode handling this.
#!/usr/bin/env -S argc -e
Thinking loudly: I was just wondering about debugging (kind of "does this lack source maps?"), but shell never prints out lines at syntax errors, so it does not really matter. One can write "set -e" anyway at the start of the functions in order to catch errors early.