Skip to content

v0.79.0

Choose a tag to compare

@ltdan-88 ltdan-88 released this 03 Sep 14:27
· 10 commits to main since this release
51176e3

What

Fixes load_bundled_hidden_commands() silently failing to register a
bundled-hidden command whenever an earlier cache field (description or
size) is genuinely empty.

Why

Found while live-verifying the previous PR (F2's F3 preview for
computed views): an All count on the view picker that disagreed with
what F3 actually listed for the same view.

load_bundled_hidden_commands() read the cache with a zsh read loop
and placeholder variables for the fields between the command name and
default_hidden (field 11). IFS=$'\t' read treats a run of
consecutive tabs the same way it treats a run of ordinary whitespace —
as a single separator — so a genuinely empty field doesn't consume a
placeholder of its own, and the read ends up one token short by the
last variable, regardless of what field 11 actually held.

Two fields a real formula's cache row can actually come back empty for
(unlike default_category, field 10, which was already given a
non-empty "-" placeholder specifically to dodge this exact bug class
— see cache_writer.py's own comment): description (no desc from
brew info) and size (no entry in brew info --sizes).

Fix

Read field 11 with awk instead — the same technique
--internal-preview-category's own equivalent lookup already uses for
the same field.

Verification

  • Reproduced the wrong result with a hand-built cache row before
    touching any code, confirmed the fix corrects it.
  • Confirmed live in a real tmux session: a bundled-hidden entry with
    an empty description made All overcount before the fix, correctly
    excluded it after.
  • test/ignore-fixtures.sh extended with both realistic empty-field
    cases. Proved it catches the regression by reverting to the old
    read-based version and confirming failure, then restored.
  • Full local suite passes.

🤖 Generated with Claude Code

https://claude.ai/code/session_01H7EeVRRBpp94V7PkdVHdE6