diff --git a/statusline.sh b/statusline.sh index 8e363f35..8dbd6fe4 100755 --- a/statusline.sh +++ b/statusline.sh @@ -4,6 +4,7 @@ set -uo pipefail input=$(cat) +# @sh quotes every value, so the JSON reaches eval as data. eval "$(printf '%s' "$input" | jq -r ' @sh "dir=\(.workspace.current_dir // .cwd // "")", @sh "model=\(.model.display_name // "")", @@ -108,6 +109,7 @@ join_parts() { } out="" +# ${a[@]+"${a[@]}"}: before bash 4.4 an empty array is unset under set -u. for line in "$(join_parts ${row1[@]+"${row1[@]}"})" "$(join_parts ${row2[@]+"${row2[@]}"})"; do [ -z "$line" ] && continue [ -n "$out" ] && out+=$'\n' diff --git a/todo.md b/todo.md index dd0088e3..e4d861a5 100644 --- a/todo.md +++ b/todo.md @@ -4,7 +4,6 @@ Ordered by how many seats of the 2026-09-24 scoring panel (`docs/decisions.md`) named the place; each is one chunk. -- Name the `set -u` empty-array idiom and the `@sh` eval in `statusline.sh`, one line each. - Make `CLAUDE.md`'s comment rules say an invariant earns a line only where the code cannot show it, state the one-line rule once, and scope the docstring exemption to what a tool consumes; today a reviewer finds two sentences saying keep and one saying delete. - Open `CLAUDE.md` → "Comments and documentation", "Negation and history", with its scope, comments and docs beside code, and cut its two restatements of the section bar; today a reviewer cites it against a `CHANGELOG.md` line, which the next paragraph governs. - Give the comprehension floor in `larv-review` its own heading and move its six-project calibration sentence to `docs/decisions.md`; today it sits under §2 "Trigger".