szn

Bug 48 — mapCommandToAction rejects commands with arguments — most config bind-key directives fail silently

48. mapCommandToAction rejects commands with arguments — most config bind-key directives fail silently

File: src/key_binding.zig:474–526 Severity: CRITICAL Status: ✅ FIXED

const trimmed = std.mem.trim(u8, cmd, " \t\"");
if (std.mem.eql(u8, trimmed, "new-window") or std.mem.eql(u8, trimmed, "neww")) return .new_window;
...

trim() strips outer whitespace and quotes, but everything after the command name (e.g. -n test, -t target) stays in trimmed. eql requires an exact match — so new-window -n "my window" fails, kill-pane -t 0 fails, next-window -a fails. Only split-window/splitw use startsWith.

Impact: bind-key C-n new-window -n test in .tmux.conf is parsed as a valid directive but mapped to null (no action), silently doing nothing. Every user who migrates a tmux config with argument-bearing bindings will hit this.