rc icon indicating copy to clipboard operation
rc copied to clipboard

Add option to report an error if user accesses undefined variable like bash 'set -u'

Open birchb1024 opened this issue 2 years ago • 0 comments

Undefined variables or misspelled variables are a common source of bugs. When coding in bash, I always set -u. Really want this in rc. Suggest:

flag u [+|-]

To paraphrase bash:

Treat unset variables other than the special ‘*’ as an error when performing
variable expansion. An error message will be written to the standard error,
and a non-interactive shell will exit.

birchb1024 avatar Mar 08 '22 05:03 birchb1024