Fixed 'notany' typo to 'not any'.
Wrapped variables and assignments in double quotes where possible to help prevent issues with spaces later.  While not strictly necessary, it should be remembered that all variables and subshell output are a single token; wrapping them in double quotes helps avoid issues related to the space character being inside IFS.  Also put true and false values into strings because bash has no understanding of a boolean; it just happens to work because when used as a bare-word both true and false are programs that exit 0 and 1 respectively.
Used declare in every place I could to help distinguish that something is a variable and marked all variables as read-only where intentional.  Removed a variable that wasn't used at all.  Removed variable 'initialization'; i.e. cases where a variable was assigned an empty string.  All variables are empty, and references to a variable that doesn't exist simply results in nothingness.
Added disambiguation for all variables (I put braces on them).  Fixed a typo where a brace and dollar sign were backward.  Changed HIERA__CMD to HIERA_CMD.  Made HIERA_CMD not read-only because in the user-name case it is assigned a new command string.
Moved usage to a function cuz the multi-line implementation scared me... a lot.
Several changes.  Changed the arithmetic operation (()) to a test case to prevent a subshell and the use of math inside shell... which is always risky.  Added a fail_sauce function to print-and-quit for ease of use.  Added exit variables for ease of use.  Fixed a lot of if..else..fi with what I call else-less programming.  People have a (bad) habit of doing this:  if positive test ; then do positive thing ; else alert about negative thing ; fi.  This can be replaced with a much cleaner version:  if negative thing ; alert about negative thing ; fi <continue on with positive thing outside the if construct).  It's wayyyy cleaner to read IMO.  I also switched the big if..elif..elif...elif..fi construct to a case..esac strucutre.  If the if..elif stuff was intention for older versions of bash, sorry.
Merge pull request #11 from KyleJHarper/kyle_contribs

Kyle contribs