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

Mine's `set -eEuo pipefail`.

I'd have to look up exactly what's what, but if you're inclined to `-e` you probably want the others too. (Off the top of my head I think E is the same thing in functions, u is bail out if a variable is used without being defined (instead of treating it as empty string), and pipefail is similar for when you pipe to something else like `this_errs | grep something`.)

I don't like `-x` personally, I find it way too verbose; more confusing than helpful.




Yeah, `-x` can be annoying if it's always on.

My suggestion would be to run your script like this `bash -x your_script.sh` when (and only when) you need to debug something.




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: