Severity: LOW
Status: ✅ FIXED
Files: src/options.zig:242-301, README.md
The option tables declare entries that no code path reads. Verified by grepping
each name across src/ excluding options.zig itself:
| Option | References outside options.zig |
|---|---|
default-terminal |
0 |
set-titles |
0 |
set-clipboard |
0 |
aggressive-resize |
0 |
clock-mode-colour |
0 |
clock-mode-style |
0 |
main-pane-height |
0 |
main-pane-width |
0 |
monitor-activity |
0 |
monitor-silence |
0 |
synchronize-panes |
0 |
word-separators |
0 |
fill-character |
0 |
Because they are real table entries, set-option accepts them and
show-options lists them, so a user has no way to tell that writing them does
nothing. The most visible case is default-terminal: README.md instructs
users to set -g default-terminal xterm-256color to restore legacy mouse
behaviour, and that instruction is inert.
clock-mode-style is worse than inert — per bug #516 it cannot even be set,
because its choices are bare digits.
For each entry, either wire it up or remove it from the table. Removing is the
honest default for the ones with no implementation; keeping them means
show-options should mark them unsupported. At minimum, fix the README.md
reference to default-terminal so it does not advertise a no-op.
The honest fix — remove the entries rather than advertise support that does not
exist. All thirteen were deleted from SESSION_OPTIONS and WINDOW_OPTIONS
in src/options.zig:
default-terminal, set-titles, set-clipboardaggressive-resize, clock-mode-colour, clock-mode-style,
main-pane-height, main-pane-width, monitor-activity, monitor-silence,
synchronize-panes, word-separators, fill-characterRemoving them means set-option now returns UnknownOption and show-options
no longer lists them, so a user gets an honest error instead of a silent no-op.
No consumer read any of them, confirmed by grepping each name across src/
outside options.zig (only the docs and the now-updated tests referenced them).
Collateral updates:
README.md no longer tells users to set -g default-terminal xterm-256color
(that option no longer exists); legacy 3-byte mouse forwarding is documented
as automatic.clock-mode-style 24; it now exercises a
second numeric choice (status 3) so the numeric-choice coverage survives the
option’s removal.coerceValue comment no longer cites the removed clock-mode-style.removed inert options are no longer recognised — bug #518 (src/options.zig)
asserts that each of the thirteen names now yields error.UnknownOption on
set and null on get, against both SESSION_OPTIONS and WINDOW_OPTIONS.
Adding an inert option back without a consumer would fail this test.Verified with the full suite on Zig 0.16.0 and 0.17.0: 1058/1058 passing on both.
Bugs #392 and #424 were dead-code inventories; both covered functions and fields but neither covered the option tables. Bug #507 catalogued the mutable module globals.