diff options
author | Ray Lee <ray-github@evq.io> | 2022-04-18 22:06:52 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-18 22:06:52 -0700 |
commit | 1cc18d7be90297b2977ef525fdfcd5f9fceeb70c (patch) | |
tree | 9c4020e1c6b43fab62dacc0eca441ab991127d75 | |
parent | 8e6a2c792693cb1715376be850d3891c119fb54e (diff) |
Fix whitespace on bool type
-rwxr-xr-x | tldr | 21 |
1 files changed, 11 insertions, 10 deletions
@@ -573,7 +573,8 @@ interactive() { } # bool defines a boolean setter / getter initialized to false. -# Usage: `bool name` +# Usage: +# bool name # name [true|false] # if name; then... if ! name; then... name && ... bool() { @@ -582,15 +583,15 @@ bool() { # localized complexity helps simplify the rest. # Anyway, this creates a new global function using $1 as its name, # acting per the description of `bool` above. - eval " - $1() { - case \$# in - 0) \$$_bool_var_name ;; - 1) [ \"\$1\" = true ] && $_bool_var_name=true || $_bool_var_name=false ;; - esac - } - $_bool_var_name=false - " + eval " + $1() { + case \$# in + 0) \$$_bool_var_name ;; + 1) [ \"\$1\" = true ] && $_bool_var_name=true || $_bool_var_name=false ;; + esac + } + $_bool_var_name=false + " } main "$@" |