satisfy newer shellsheck
authorIan Kelling <iank@fsf.org>
Wed, 13 Oct 2021 20:43:36 +0000 (16:43 -0400)
committerIan Kelling <iank@fsf.org>
Wed, 13 Oct 2021 20:43:36 +0000 (16:43 -0400)
err

diff --git a/err b/err
index 2e886de108db070e9bdee76f23cd93d4d0156f82..76f3939f2d4b667d6d17a879573928254b28262d 100644 (file)
--- a/err
+++ b/err
@@ -158,7 +158,7 @@ err-exit() {
     _chars="${#_cmdr}"
     _cmdr="${_cmdr#*$}"
     _cmdr="${_cmdr#{}"
-    if [[ $_chars == ${#_cmdr} ]]; then
+    if (( _chars == ${#_cmdr} )); then
       break
     fi
     _var="${_cmdr%%[^a-zA-Z0-9_]*}"
@@ -172,7 +172,7 @@ err-exit() {
   if (( ${#_vars[@]} )); then
     set |& while read -r _l; do
              for _var in "${_vars[@]}"; do
-               if [[ $_l == $_var ]]; then
+               if [[ $_l == "$_var" ]]; then
                  printf "%s\n" "$_l" >&2
                fi
              done