Name the set -u empty-array idiom and the @sh eval in statusline.sh #29

Merged
lilleman merged 1 commits from statusline-idioms into main 2026-09-25 07:49:32 +02:00
2 changed files with 2 additions and 1 deletions
+2
View File
@@ -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'
-1
View File
@@ -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".