This is a great article. I just want to highlight this insane behavior in particular (slightly dramatized):
set -e
safeDelete() {
false
# Surely we don't reach this, right?
echo "rm $@ goes brr..."
}
if safeDelete all of my files; then
: # do more stuff
fi
Frankly if you actually need robustness (which is not always), you should be using a real programming language with exceptions or result types or both (i.e. not C). UNIX processes are just not really up to the task.