Use arithmetic conditionals for numeric tests in bin

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
David Heinemeier Hansson
2026-07-24 12:25:20 -07:00
co-authored by Claude Opus 5
parent f15a91cbe2
commit d407454511
7 changed files with 12 additions and 12 deletions
+2 -2
View File
@@ -416,7 +416,7 @@ cmd_replace() {
local new="${2:-}"
[[ -n $old ]] || fail "replace requires the source widget id"
[[ -n $new ]] || fail "replace requires the replacement widget id"
[[ $# -eq 2 ]] || fail "replace takes two widget ids"
(( $# == 2 )) || fail "replace takes two widget ids"
local prog
prog=$(cat <<JQ
@@ -439,7 +439,7 @@ JQ
# --------------------------------------------------------------------- dispatch
command="${1:-}"
[[ $# -gt 0 ]] && shift || true
(( $# > 0 )) && shift || true
case "$command" in
add)