bashstyle icon indicating copy to clipboard operation
bashstyle copied to clipboard

Mention 'set -u' and ${arg:?message}

Open ernstki opened this issue 3 years ago • 0 comments

I tried to make this as uncontentious as possible, with set -uo pipefail being the "do this 100% of the time by default" advice and set -e being the "but also consider this" choice.

The set -u part should not be controversial. It's use strict for Bash, which would be the default in e.g. Perl and JavaScript if not for concerns of backward compatibility.

But if you feel very, very strongly about having all three of them together (set -euo pipefail), I am happy to defer to your judgment there and amend this PR.

Closes #29 and #37.

ernstki avatar Oct 18 '20 13:10 ernstki