Hacker News new | past | comments | ask | show | jobs | submit login

There's a bug in his template.

He suggests to `set -eu`, which is a good idea, but then immediately does this:

    if [[ "$1" =~ ^-*h(elp)?$ ]]; ...
If the script is given no arguments, this will exit with an unbound variable error. Instead, you want something like this:

    if [[ "${1-}" =~ ^-*h(elp)?$ ]]; then



Good catch. Fixing it.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: