From: Ian Kelling Date: Wed, 13 Oct 2021 20:43:36 +0000 (-0400) Subject: satisfy newer shellsheck X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=3df3919e70b866b261e614d0b7327458f2853bbb;p=errhandle.git satisfy newer shellsheck --- diff --git a/err b/err index 2e886de..76f3939 100644 --- 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