Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
151 commits
Select commit Hold shift + click to select a range
12cf54a
docs: add shell completion design spec
ammachado Aug 21, 2026
5d0713a
docs: add shell completion implementation plan
ammachado Aug 21, 2026
0c9c95a
feat(cli): add ArgumentParser facade routing bridge
ammachado Aug 21, 2026
cfbcff6
fix(cli): localize facade help abstract
ammachado Aug 21, 2026
3f093f9
feat(cli): add command tree snapshot check
ammachado Aug 21, 2026
860b12a
fix(cli): repair command tree project wiring
ammachado Aug 21, 2026
2566811
feat(cli): add cmux completion command
ammachado Aug 21, 2026
d575b37
fix(cli): wrap completion argument help
ammachado Aug 21, 2026
6ecc900
test(cli): refresh completion command tree snapshot
ammachado Aug 21, 2026
0ee0b30
fix(cli): render positional command tree names
ammachado Aug 21, 2026
abb9dd1
feat(cli): add completion candidate safety contract
ammachado Aug 21, 2026
9cfcca4
feat(cli): complete live cmux refs, themes, and VM ids
ammachado Aug 21, 2026
a50d959
feat(cli): declare meta command family
ammachado Aug 21, 2026
4beaa35
test(cli): refresh meta command tree snapshot
ammachado Aug 21, 2026
3694966
feat(cli): declare auth command family
ammachado Aug 21, 2026
8ec74ec
fix(cli): order auth command aliases
ammachado Aug 21, 2026
3a89edb
fix(cli): retain auth aliases in legacy router
ammachado Aug 21, 2026
03e183e
test(cli): refresh auth command tree snapshot
ammachado Aug 21, 2026
6c7c398
fix(cli): declare top-level auth aliases
ammachado Aug 21, 2026
665ad12
test(cli): refresh top-level auth aliases snapshot
ammachado Aug 21, 2026
d1ed33b
feat(cli): declare VM and remote commands
ammachado Aug 21, 2026
a32f30a
fix(cli): order VM command configuration arguments
ammachado Aug 21, 2026
a7ca23e
test(cli): refresh VM command tree snapshot
ammachado Aug 21, 2026
7e60576
feat(cli): declare window command family
ammachado Aug 21, 2026
85c40b2
test(cli): refresh window command tree snapshot
ammachado Aug 21, 2026
63f4060
feat(cli): add workspace command facade
ammachado Aug 21, 2026
8d0ba8c
fix(cli): disambiguate workspace completions
ammachado Aug 21, 2026
149e3f4
fix(cli): use directory completion property
ammachado Aug 21, 2026
fadce0e
test(cli): refresh workspace command tree snapshot
ammachado Aug 21, 2026
b6c2d73
fix(cli): preserve delegated command help
ammachado Aug 21, 2026
a652d23
fix(cli): preserve workspace argument passthrough
ammachado Aug 21, 2026
d074b68
feat(cli): declare pane and surface command family
ammachado Aug 21, 2026
d75fe78
test(cli): refresh pane and surface command tree snapshot
ammachado Aug 21, 2026
cb8a643
feat(cli): declare browser command family
ammachado Aug 21, 2026
f1e57aa
fix(cli): expose browser legacy alias declarations
ammachado Aug 21, 2026
c3aa848
test(cli): refresh browser command tree snapshot
ammachado Aug 21, 2026
1c58680
fix(cli): expose browser completion arguments
ammachado Aug 21, 2026
7e83af0
fix(cli): restore browser double-click declaration
ammachado Aug 21, 2026
2ac0115
test(cli): refresh browser completion tree snapshot
ammachado Aug 21, 2026
d7d0249
fix(cli): scope browser completion options
ammachado Aug 21, 2026
08d952e
test(cli): narrow browser completion tree snapshot
ammachado Aug 21, 2026
68f823d
fix(cli): restrict browser option groups
ammachado Aug 21, 2026
c3f78b8
feat(cli): declare browser automation arguments
ammachado Aug 21, 2026
e1a2eb1
feat(cli): declare browser select and scroll arguments
ammachado Aug 21, 2026
49c9741
feat(cli): declare browser automation syntax
ammachado Aug 21, 2026
dab9d48
feat(cli): complete browser command metadata
ammachado Aug 21, 2026
e07230f
feat(cli): declare browser navigation completion
ammachado Aug 21, 2026
3b12e1e
test(cli): finalize browser completion tree snapshot
ammachado Aug 21, 2026
897ce7a
fix(cli): align browser wait completion options
ammachado Aug 21, 2026
e812341
test(cli): refresh final browser command tree snapshot
ammachado Aug 21, 2026
bae006d
feat(cli): declare tmux compatibility commands
ammachado Aug 21, 2026
8553bc0
test(cli): refresh tmux compatibility tree snapshot
ammachado Aug 21, 2026
26330bb
fix(cli): complete panel target candidates
ammachado Aug 21, 2026
1dec02b
feat(cli): declare hooks and agent launchers
ammachado Aug 21, 2026
29cc338
fix(cli): make agent launcher declarations explicit
ammachado Aug 21, 2026
de94c8c
test(cli): refresh hooks command tree snapshot
ammachado Aug 21, 2026
3e3d060
feat(cli): declare notification command family
ammachado Aug 21, 2026
0fe72d5
fix(cli): preserve facade validation exit codes
ammachado Aug 21, 2026
c74ca1c
fix(cli): expose facade validation output
ammachado Aug 21, 2026
698505a
fix(cli): preserve notification selector diagnostics
ammachado Aug 21, 2026
515c765
test(cli): refresh notification command tree snapshot
ammachado Aug 21, 2026
c5c4afe
feat(cli): declare remaining system command family
ammachado Aug 21, 2026
08d7187
refactor(cli): derive command name list from declared tree
ammachado Aug 22, 2026
092a7a6
test(cli): gate dispatch and alias parity
ammachado Aug 22, 2026
e467446
fix(cli): handle global options on both sides of the command
ammachado Aug 22, 2026
96ea371
i18n(cli): localize command abstracts and option help
ammachado Aug 22, 2026
4b63c4a
fix(cli): route ArgumentParser completion requests to the facade
ammachado Aug 22, 2026
d1f104f
docs(cli): document shell completion install
ammachado Aug 22, 2026
5e6421d
fix: handle AgentHookFailureStage.journalAppend in failure reporting
ammachado Aug 22, 2026
1e565d5
fix(cli): preserve exit codes and argument handling in the ArgumentPa…
ammachado Aug 22, 2026
bece065
fix(cli): localize new completion docs topic strings
ammachado Aug 22, 2026
f1854f6
fix(cli): address CodeRabbit review findings on the ArgumentParser fa…
ammachado Aug 22, 2026
70eb8fe
fix(cli): localize completion docs label and add real translations
ammachado Aug 22, 2026
e0ea3fb
docs: drop shell-completion planning docs from the PR
ammachado Aug 22, 2026
9ec2303
fix(cli): close wait-for lock TOCTOU race, tighten completion check, …
ammachado Aug 22, 2026
cb44e0b
refactor(cli): finish collapsing legacy routing protocols onto Shared…
ammachado Aug 22, 2026
174a487
refactor(cli): extract shared filesystem-wait helper
ammachado Aug 22, 2026
6907a6d
feat(brew): install shell completions from the cask
ammachado Aug 24, 2026
10e9ea4
docs(i18n): sync translated READMEs with SSH --command and shell comp…
ammachado Aug 24, 2026
79833a1
fix(cli): keep legacy parsing authoritative behind the facade
ammachado Sep 1, 2026
0adaf7a
fix(cli): adopt async CMUXCLI.run() and declare commands added on main
ammachado Sep 6, 2026
ce92b8f
test(cli): gate cr as a passthrough alias, not a help alias
ammachado Sep 6, 2026
ea8c2c5
fix(cli): declare local-tmux and its tmux alias in the facade tree
ammachado Sep 8, 2026
148d3e7
fix(cli): restrict the tmux alias to attach and restore local-tmux pa…
ammachado Sep 8, 2026
e85ff10
fix(cli): correct restore --surface, wait-for locks, and the tmux alias
ammachado Sep 9, 2026
a949672
feat(cli): declare the command surface completion was missing
ammachado Sep 9, 2026
78f1910
fix(cli): bound and sanitize dynamic completion candidates
ammachado Sep 9, 2026
e0470e6
test(cli): make CLI subprocess tests hermetic and unstallable
ammachado Sep 9, 2026
9dcc8c1
test(cli): pin the tmux alias and attach-retry noise regressions
ammachado Sep 10, 2026
b41fd7b
fix(cli): restore the tmux alias diagnostic and facade retry silence
ammachado Sep 10, 2026
4a79ea9
i18n(cli): drop duplicate dismiss-notification selector locales
ammachado Sep 11, 2026
1592996
fix(cli): declare the agent and sudo commands main added
ammachado Sep 11, 2026
84c82f2
test(cli): gate every command `cmux help` lists on a facade declaration
ammachado Sep 13, 2026
298d242
fix(cli): declare the guide and sessions commands
ammachado Sep 13, 2026
43bbc4a
test(cli): gate vm verbs and documented flag spellings on the facade …
ammachado Sep 13, 2026
cd689a1
fix(cli): declare every vm verb and the --skill spellings
ammachado Sep 13, 2026
088a47e
test(cli): pin facade rejections of shapes the legacy runner accepts
ammachado Sep 13, 2026
808e7c7
fix(cli): route only facade-native commands through ArgumentParser
ammachado Sep 13, 2026
c255c46
fix(cli): declare current, glaeda, and socket-status commands main added
ammachado Sep 23, 2026
968ac0b
fix(cli): declare paste and resize-window commands main added
ammachado Sep 27, 2026
d362645
Merge commit '90e1689ffc9d118dd70ae27f38a80ca636a9783f' into feature/…
ammachado Oct 1, 2026
9579d72
test(cli): parse grouped `cmux help` in the dispatch parity gate
ammachado Oct 1, 2026
1d4b359
fix(cli): declare commands main added since the last catch-up
ammachado Oct 1, 2026
fc8683b
test(cli): wait-for locks must live in the private signal directory
ammachado Oct 1, 2026
def113c
fix(cli): keep wait-for locks in the private signal directory
ammachado Oct 1, 2026
1c19511
test(cli): register completion gates in CI and bound their subprocesses
ammachado Oct 1, 2026
9a14564
docs: split shell completion snippets and require compinit for zsh
ammachado Oct 1, 2026
98ba9ff
fix(cli): declare missing flags and subcommands in completion facades
ammachado Oct 1, 2026
daa4da0
test(cli): share the process-group-killing runner and fix test messages
ammachado Oct 1, 2026
3138dd6
fix(cli): complete workspace status and loading arguments
ammachado Oct 1, 2026
34f8851
Merge main (51b60f3b30) into feature/cmux-shell-autocomplete
ammachado Oct 2, 2026
96a253b
fix(cli): scope completion candidates to explicit workspace and windo…
ammachado Oct 2, 2026
33041d6
Merge main (70e997fb47b0) into feature/cmux-shell-autocomplete
ammachado Oct 2, 2026
1a052f0
Merge main (541c7351fa65) into feature/cmux-shell-autocomplete
ammachado Oct 2, 2026
2a8303e
fix(cli): complete and localize wait-for lock help
teamleaderleo Oct 2, 2026
c80261b
Merge current main for CLI completion review
teamleaderleo Oct 2, 2026
ffdf8b6
Merge origin/main (1a7d5cd08ad) into feature/cmux-shell-autocomplete
ammachado Oct 4, 2026
f625b18
Merge main (fcaefa330ba1) into feature/cmux-shell-autocomplete
ammachado Oct 4, 2026
381a6b2
test(cli): completion must use the --socket and --password typed on t…
ammachado Oct 4, 2026
eade79b
fix(cli): complete against the --socket and --password typed on the line
ammachado Oct 4, 2026
ee75927
fix(cli): declare vm network/agent-updates and refresh the command tree
ammachado Oct 4, 2026
0ddcd6b
Merge main
teamleaderleo Oct 4, 2026
58f1290
i18n(cli): keep Localizable.xcstrings in main's order
ammachado Oct 4, 2026
2893f10
fix(cli): adopt the three-parameter custom completion form
ammachado Oct 4, 2026
eed5abc
fix(cli): declare browser repl and refresh the command tree
ammachado Oct 4, 2026
3492a4e
docs(cli): sync wait-for usage in CLI contract with -L/-U flags
ammachado Oct 5, 2026
eb43ec2
Merge main (f60146706458) into feature/cmux-shell-autocomplete
ammachado Oct 5, 2026
bafefab
Merge main (c72d139fb06b) into feature/cmux-shell-autocomplete
ammachado Oct 7, 2026
4c21e70
test(cli): completion must skip bash's lone = and offer every setting…
ammachado Oct 7, 2026
d89c6b1
fix(cli): skip bash's lone = in completion selectors; offer themes an…
ammachado Oct 7, 2026
84f17f8
Merge commit 'b98fdc2fef8bf385a1211613916885a367e977ba' into feature/…
ammachado Oct 8, 2026
555139b
test(cli): cmux config completion must offer every documented verb
ammachado Oct 8, 2026
5024644
fix(cli): offer unset, toggle, cycle and preset in cmux config comple…
ammachado Oct 8, 2026
08750ef
test(ci): register the config completion verbs check
ammachado Oct 8, 2026
e17d2bf
Merge main (ce6be93cf232) into feature/cmux-shell-autocomplete
ammachado Oct 9, 2026
e54e492
Merge main (033c9be367ee) into feature/cmux-shell-autocomplete
ammachado Oct 10, 2026
a8d1478
test(cli): cmux hooks completion must offer every documented verb
ammachado Oct 10, 2026
bcc435a
fix(cli): offer feed in cmux hooks completion
ammachado Oct 10, 2026
d3f5ee6
Merge commit '785c43710ab6960ad3f2aa2776c2206666e00364' into feature/…
ammachado Oct 11, 2026
402e575
docs(cli): add jump-to-last-prompt to the command tree snapshot
ammachado Oct 11, 2026
c9c9cad
Merge main (67431d2c1cec) into feature/cmux-shell-autocomplete
ammachado Oct 11, 2026
8eb6102
Merge main (5ded302c84aa) into feature/cmux-shell-autocomplete
ammachado Oct 13, 2026
d3a565e
docs(cli): regenerate command tree for the muse hook agent
ammachado Oct 13, 2026
c9bb915
Merge commit '2eafd0dfac2a37f4f7717ca78bda3ac68d4733ca' into feature/…
ammachado Oct 15, 2026
24a815a
Merge main (0f1a17598367) into feature/cmux-shell-autocomplete
ammachado Oct 16, 2026
6be072c
fix(cli): declare vm restart in the completion tree
ammachado Oct 16, 2026
4eb2bf5
Merge main (6249b33cdfda) into feature/cmux-shell-autocomplete
ammachado Oct 17, 2026
59d9477
Merge main (56ca4b90d803) into feature/cmux-shell-autocomplete
ammachado Oct 18, 2026
961a8c3
Merge origin/main into feature/cmux-shell-autocomplete
teamleaderleo Oct 18, 2026
7b12ff7
Merge remote-tracking branch 'origin/main' into pr-10568-b
teamleaderleo Oct 18, 2026
8d25f8d
Merge remote-tracking branch 'origin/main' into pr-10568-c
teamleaderleo Oct 18, 2026
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
3 changes: 2 additions & 1 deletion .github/workflows/update-homebrew.yml
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ jobs:
url "https://github.com/manaflow-ai/cmux/releases/download/v#{version}/cmux-macos.dmg"
name "cmux"
desc "Lightweight native macOS terminal with vertical tabs for AI coding agents"
homepage "https://cmux.com"
homepage "https://cmux.com/"

livecheck do
url :url
Expand All @@ -188,6 +188,7 @@ jobs:

app "cmux.app"
binary "#{appdir}/cmux.app/Contents/Resources/bin/cmux"
generate_completions_from_executable "#{HOMEBREW_PREFIX}/bin/cmux", "completion"

zap trash: [
"~/Library/Application Support/cmux",
Expand Down
13 changes: 13 additions & 0 deletions CLI/CMUXCLI+AgentHookCatalog.swift
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,19 @@ extension CMUXCLI {
),
]

/// The agents `cmux hooks <agent> ...` and `cmux hooks setup --agent <name>`
/// accept, derived from the same catalog `agentDef(named:)` resolves against,
/// so catalog aliases are offered alongside primary names.
static let hookAgentNames: [String] = Set(agentDefs.flatMap { [$0.name] + $0.aliases }).sorted()

/// Completion candidates for the first token of `cmux hooks`: the
/// catalog-wide verbs `cmux hooks --help` documents plus every agent. `hooks`
/// stays an unrecognized-argument sink rather than a subcommand tree because
/// past the first token it dispatches into the per-agent event entrypoints
/// that generated configs own, and declaring those would put internal hook
/// events in the user-facing tree.
static let hooksTargetNames: [String] = ["setup", "uninstall", "feed"] + hookAgentNames

static func agentDef(named name: String) -> AgentHookDef? {
let normalized = name.trimmingCharacters(in: .whitespacesAndNewlines).lowercased()
return agentDefs.first { $0.name == normalized || $0.aliases.contains(normalized) }
Expand Down
196 changes: 1 addition & 195 deletions CLI/CMUXCLI+CommandSuggestions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -50,199 +50,5 @@ extension CMUXCLI {
return previous[right.count]
}

static let topLevelCommandNames: Set<String> = [
"__codex-teams-watch",
"__internal_flags",
"__sidebar_footer_icon_balance",
"__tmux-compat",
"agent",
"agent-hibernation",
"ai-accounts",
"automation",
"auth",
"bind-key",
"break-pane",
"browser",
"browser-back",
"browser-forward",
"browser-reload",
"browser-status",
"capabilities",
"capture-pane",
"claude-hook",
"claude-teams",
"clear-history",
"clear-log",
"clear-notifications",
"clear-progress",
"clear-status",
"close-surface",
"close-window",
"close-workspace",
"cloud",
"coderouter",
"cr",
"codex",
"codex-hook",
"codex-teams",
"comments",
"config",
"copy-mode",
"current",
"current-window",
"current-workspace",
"debug-terminals",
"detach-tab",
"diff",
"disable-browser",
"dismiss-notification",
"display-message",
"docs",
"drag-surface-to-split",
"enable-browser",
"events",
"feedback",
"feed",
"feed-hook",
"fork",
"find-window",
"focus-pane",
"focus-panel",
"focus-webview",
"focus-window",
"get-url",
"glaeda",
"help",
"hooks",
"identify",
"import",
"is-webview-focused",
"ios",
"join-pane",
"jump-to-last-prompt",
"jump-to-unread",
"last-pane",
"last-window",
"list-buffers",
"list-log",
"list-notifications",
"list-pane-surfaces",
"list-panels",
"list-panes",
"list-status",
"list-windows",
"list-workspaces",
"log",
"login",
"logout",
"local-tmux",
"local-zellij",
"markdown",
"mark-notification-read",
"memory",
"mobile",
"mosh",
"mosh-tmux",
"move-surface",
"move-tab-to-new-workspace",
"move-workspace-to-window",
"navigate",
"new-pane",
"new-split",
"new-surface",
"new-window",
"new-workspace",
"next-window",
"notify",
"omc",
"omo",
"omx",
"open",
"open-browser",
"open-notification",
"paste",
"paste-buffer",
"ping",
"pipe-pane",
"popup",
"pr",
"previous-window",
"read-screen",
"read-selection",
"record",
"refresh-surfaces",
"reload-config",
"remote-daemon-status",
"rename-tab",
"rename-window",
"rename-workspace",
"reorder-surface",
"reorder-workspace",
"reorder-workspaces",
"resize-pane",
"resize-window",
"respawn-pane",
"restore-session",
"restore",
"right-sidebar",
"rpc",
"screenshot",
"select-workspace",
"send",
"send-key",
"send-key-panel",
"send-panel",
"session",
"sessions",
"set-app-focus",
"set-buffer",
"set-hook",
"set-progress",
"set-status",
"settings",
"setup-hooks",
"shortcuts",
"shot",
"socket-status",
"simulate-app-active",
"simulator",
"sidebar",
"sidebar-state",
"split-off",
"ssh",
"ssh-pty-attach",
"ssh-session-attach",
"ssh-session-cleanup",
"ssh-session-end",
"ssh-session-list",
"ssh-tmux",
"sudo",
"surface",
"surface-health",
"surface-resume",
"swap-pane",
"tab-action",
"themes",
"tmux",
"todo",
"top",
"tree",
"trigger-flash",
"unbind-key",
"uninstall-hooks",
"vault",
"version",
"vm",
"vm-pty-attach",
"vm-pty-connect",
"vm-ssh-attach",
"vm-tui-approve",
"vm-tui-connect",
"vpn",
"wait-for",
"welcome",
"workspace",
"workspace-action",
"workspace-group",
]
static let topLevelCommandNames: Set<String> = CmuxCommand.declaredCommandNames
}
128 changes: 128 additions & 0 deletions CLI/CMUXCLI+CommandTreeDump.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
import Foundation

extension CMUXCLI {
func runDumpCommandTree() throws {
let data = Data(CmuxCommand._dumpHelp().utf8)
let toolInfo = try JSONDecoder().decode(CommandTreeToolInfo.self, from: data)
// ArgumentParser synthesizes its own "help" subcommand alongside any
// explicitly declared one with the same name, so the same path can
// appear twice; keep one entry per path.
var seenPaths: Set<String> = []
let entries = commandTreeEntries(from: toolInfo.command)
.sorted { $0.path < $1.path }
.filter { seenPaths.insert($0.path).inserted }

for entry in entries {
print("command \(entry.path) aliases=\(entry.aliases)")
for argument in entry.arguments.sorted(by: { $0.name < $1.name }) {
print(" arg \(argument.name) kind=\(argument.kind) completion=\(argument.completion)")
}
}
}

private func commandTreeEntries(from root: CommandTreeCommandInfo) -> [CommandTreeEntry] {
root.subcommands
.flatMap { commandTreeEntries(from: $0, path: []) }
}

private func commandTreeEntries(
from command: CommandTreeCommandInfo,
path: [String]
) -> [CommandTreeEntry] {
let path = path + [command.commandName]
let entry = CommandTreeEntry(
path: path.joined(separator: " "),
aliases: command.aliases?.sorted().joined(separator: ",") ?? "-",
arguments: command.arguments
.filter { $0.preferredName?.rendered != "--help" }
.map(CommandTreeArgumentEntry.init)
)
return [entry] + command.subcommands.flatMap { commandTreeEntries(from: $0, path: path) }
}
}

private struct CommandTreeToolInfo: Decodable {
let command: CommandTreeCommandInfo
}

private struct CommandTreeCommandInfo: Decodable {
let commandName: String
let aliases: [String]?
let subcommands: [CommandTreeCommandInfo]
let arguments: [CommandTreeArgumentInfo]

private enum CodingKeys: String, CodingKey {
case commandName
case aliases
case subcommands
case arguments
}

init(from decoder: Decoder) throws {
let container = try decoder.container(keyedBy: CodingKeys.self)
commandName = try container.decode(String.self, forKey: .commandName)
aliases = try container.decodeIfPresent([String].self, forKey: .aliases)
subcommands = try container.decodeIfPresent([CommandTreeCommandInfo].self, forKey: .subcommands) ?? []
arguments = try container.decodeIfPresent([CommandTreeArgumentInfo].self, forKey: .arguments) ?? []
}
}

private struct CommandTreeArgumentInfo: Decodable {
let kind: String
let preferredName: CommandTreeArgumentName?
let valueName: String?
let completionKind: CommandTreeCompletionKind?
}

private struct CommandTreeArgumentName: Decodable {
let kind: String
let name: String

var rendered: String {
switch kind {
case "long": "--\(name)"
case "short", "longWithSingleDash": "-\(name)"
default: name
}
}
}

private enum CommandTreeCompletionKind: Decodable {
case list(values: [String])
case file(extensions: [String])
case directory
case shellCommand(command: String)
case custom
case customAsync
case customDeprecated

var rendered: String {
switch self {
case .list(let values): "list(\(values.sorted().joined(separator: ",")))"
case .file(let extensions): "file(\(extensions.sorted().joined(separator: ",")))"
case .directory: "directory"
case .shellCommand(let command): "shell-command(\(command))"
case .custom: "custom"
case .customAsync: "custom-async"
case .customDeprecated: "custom-deprecated"
}
}
}

private struct CommandTreeEntry {
let path: String
let aliases: String
let arguments: [CommandTreeArgumentEntry]
}

private struct CommandTreeArgumentEntry {
let name: String
let kind: String
let completion: String

init(_ argument: CommandTreeArgumentInfo) {
name = argument.preferredName?.rendered ?? argument.valueName ?? "-"
kind = argument.kind == "positional" ? "argument" : argument.kind
completion = argument.completionKind?.rendered ?? "-"
}
}
11 changes: 11 additions & 0 deletions CLI/CMUXCLI+Config.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@ import CmuxFoundation
import CmuxSettings

extension CMUXCLI {
/// Completion candidates for `cmux config`, matching the subcommands the
/// runner switches on and `configUsage()` documents. Canonical spellings
/// only; `check`/`validate`/`paths`/`documentation` still resolve.
static let configSubcommandNames = [
"doctor", "path", "docs", "reload", "get", "set",
"unset", "toggle", "cycle", "preset",
CmuxGhosttyConfigSettingEditor.sidebarFontSizeKey,
CmuxGhosttyConfigSettingEditor.surfaceTabBarFontSizeKey,
"help",
]
Comment thread
ammachado marked this conversation as resolved.

func runConfigCommand(
commandArgs: [String],
socketPath: String?,
Expand Down
Loading
Loading