Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion CLI/cmux.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2698,7 +2698,9 @@ struct CMUXCLI {
"paste-buffer",
"list-buffers",
"respawn-pane",
"display-message":
"display-message",
"show-options",
"show-option":
try runTmuxCompatCommand(
command: command,
commandArgs: commandArgs,
Expand Down Expand Up @@ -11689,6 +11691,11 @@ struct CMUXCLI {
try tmuxPruneCompatWorkspaceState(workspaceId: workspaceId)
}

case "show-options", "show-option":
// Stub: omx queries `tmux show-options -sv extended-keys` to check
// terminal key mode. cmux handles keys natively, so return empty.
print("")

case "set-option", "set", "set-window-option", "setw", "source-file", "refresh-client", "attach-session", "detach-client":
return

Expand Down Expand Up @@ -12286,6 +12293,11 @@ struct CMUXCLI {
print(message)
}

case "show-options":
// Stub: omx queries `tmux show-options -sv extended-keys` to check
// terminal key mode. cmux handles keys natively, so return empty.
print("")
Comment on lines +12296 to +12299
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Unreachable handler — show-options is never dispatched here

The show-options case is placed inside runTmuxCompatCommand, but no dispatch path routes show-options to that function. runTmuxCompatCommand is only called from (1) the main dispatch's hard-coded list at lines 2679–2701 and (2) the explicit forwarding lists inside runClaudeTeamsTmuxCompat — neither includes "show-options". When omx calls tmux show-options -sv extended-keys, the shim dispatches as __tmux-compat show-options …runClaudeTeamsTmuxCompat → switch finds no match → default at line 11699 → still throws "Unsupported tmux compatibility command: show-options". The stub is dead code.

The fix belongs in runClaudeTeamsTmuxCompat's switch, appended to the existing no-op block at line 11692:

Suggested change
case "show-options":
// Stub: omx queries `tmux show-options -sv extended-keys` to check
// terminal key mode. cmux handles keys natively, so return empty.
print("")
case "set-option", "set", "set-window-option", "setw", "source-file", "refresh-client", "attach-session", "detach-client", "show-options":
return

If an empty-string response is required instead of a silent no-op, add case "show-options": print(""); return as a separate case before that block.


default:
throw CLIError(message: "Unsupported tmux compatibility command: \(command)")
}
Expand Down