#compdef par-mux

autoload -U is-at-least

_par-mux() {
    typeset -A opt_args
    typeset -a _arguments_options
    local ret=1

    if is-at-least 5.2; then
        _arguments_options=(-s -S -C)
    else
        _arguments_options=(-s -C)
    fi

    local context curcontext="$curcontext" state line
    _arguments "${_arguments_options[@]}" : \
'--socket=[Bind an explicit socket path instead of the named default]:PATH:_files' \
'--state-dir=[Override the platform state directory (D3.4) that persisted session trees are written under, instead of the OS-standard state/data dir]:DIR:_files' \
'--machine=[Relay this invocation to a saved machine over SSH (the machine'\''s profile in \`\[machines.<label>\]\` names the ssh target; credentials stay with ssh itself). One-shot commands (\`--cmd\`, \`status\`, \`ls\`, \`observe\`, \`control\`, \`--stop\`) run non-interactively; \`attach\` forces passthrough under a pty — the thin client]:LABEL:_default' \
'(--state-dir)-c+[Client mode\: send one control command to the daemon on this socket, print its reply body to stdout (one line per reply line), and exit. A \`%error\` reply prints to stderr and exits non-zero. Never starts a daemon. A flag, like --stop, so the positional NAME stays unambiguous]:COMMAND:_default' \
'(--state-dir)--cmd=[Client mode\: send one control command to the daemon on this socket, print its reply body to stdout (one line per reply line), and exit. A \`%error\` reply prints to stderr and exits non-zero. Never starts a daemon. A flag, like --stop, so the positional NAME stays unambiguous]:COMMAND:_default' \
'--skills-dir=[With --install-skill\: write under this skills root instead of the Claude Code default (tests, other agent harnesses)]:DIR:_files' \
'--print-completions=[Print the shell-completion script for SHELL (bash, zsh, fish, powershell, elvish) generated from this CLI, and exit. Never contacts a daemon]:SHELL:(bash elvish fish powershell zsh)' \
'--stop[Stop the daemon serving this socket cleanly (final state save, \`%exit\` to clients) and wait for it to exit. Flags rather than subcommands\: the positional NAME would otherwise be ambiguous with a session named \`stop\`]' \
'--restart[Stop the running daemon (as --stop), then start a fresh one on the same socket — it restores the tree the stop just saved. Use after rebuilding par-mux\: clients attach to whatever daemon owns the socket, so an old daemon keeps serving old code until restarted]' \
'(--no-attach --stop -c --cmd --list-servers --gen-config --install-skill --install-agent-hooks --uninstall-agent-hooks --agent-hooks-status --integration-status --install-agent-extensions --uninstall-agent-extensions --heal-agent-hooks --print-schema --print-completions)--foreground[Serve the daemon in the foreground of this process instead of the default daemonize-to-background\: the debugging and supervision escape, and the shape programmatic spawners use (they own and kill the child they spawned). Not a daemon_mode member on purpose\: it composes with --restart (stop, then serve here)]' \
'(--foreground --stop -c --cmd --list-servers --gen-config --install-skill --install-agent-hooks --uninstall-agent-hooks --agent-hooks-status --integration-status --install-agent-extensions --uninstall-agent-extensions --heal-agent-hooks --print-schema --print-completions)--no-attach[Daemon-only\: daemonize to background as usual but skip the auto-attach of the invoking terminal (and the isatty fallback that skips attaching for scripted starts)]' \
'--list-servers[Client mode\: list every live par-mux server this user can reach — registry entries plus the named-default sockets on disk — one line per server (\`<name-or-path>  sessions=N  stamp\`), pruning registry entries whose probe failed. Never starts a daemon. Honors \`--state-dir\`, so tests can point the registry at a fixture; with \`--socket\`/NAME, the named/default resolution is skipped for the target socket (discovery is user-wide, not per-socket)]' \
'--pane-endpoints[Give each pane its own hook-only socket endpoint\: \`PAR_MUX_SOCKET\` in a pane then names a socket that accepts ONLY hook reports for that pane, so its child processes cannot drive other panes or stop the server. Default off — the in-pane full-socket fallback is a core feature; see docs/MUX.md for the trade and the default-flip gate]' \
'--expose-control-socket[With --pane-endpoints\: also export \`PAR_MUX_CONTROL_SOCKET\` (the full control socket) in every pane, so agent-driven pane control keeps working. A session env of \`PAR_MUX_CONTROL=1\` grants the same per session without this flag]' \
'--gen-config[Write the config file with the CURRENT EFFECTIVE settings (file if present > env > built-in defaults; startup CLI flags are not introspectable after parse, so a flagged value that also appears here wins only where this code path sees the flag — the socket and the daemon bools). Never overwrites without --force. With no config file yet, this is how a user starts one]' \
'--force[With --gen-config\: overwrite an existing config file]' \
'--install-skill[Install the bundled par-mux agent skill into the Claude Code skills directory and exit. Never starts or contacts a daemon, so it runs anywhere, including inside a pane; par-term invokes it after installing par-mux so the skill matches the shipped binary]' \
'--install-agent-hooks[Install the agent-state session hooks for claude, codex, grok, muse, droid, copilot, and cursor (script assets plus the config entries that run them) and exit. Never starts or contacts a daemon; par-term invokes it instead of embedding its own copies of the integrations]' \
'--uninstall-agent-hooks[Remove the agent-state session hooks par-mux installed\: the config entries first, then the script assets. Never contacts a daemon]' \
'--agent-hooks-status[Print one line per agent — \`<agent> installed\` or \`<agent> absent\` — and exit\: the read-only state behind the par-term Settings rows]' \
'--integration-status[Print one line per integration — the agent hooks, the pi/omp extensions, and the par-mux skill — naming each one'\''s version and whether the installed asset matches the bundled copy (\`v2\`, \`v1 → v2 outdated\`, \`asset missing\`, or \`absent\`), and exit]' \
'--install-agent-extensions[Install the pi and omp agent-state extensions (a file drop into each agent extension directory) and exit. Never contacts a daemon]' \
'--uninstall-agent-extensions[Remove the pi and omp agent-state extensions par-mux installed]' \
'--heal-agent-hooks[Rewrite a registered hook script asset that went missing (the hooks directory has been deleted externally while the agent config entries survived) without touching any agent config — the startup self-heal par-term runs. Never contacts a daemon]' \
'--print-schema[Print the versioned JSON command schema (every control command, its flags, and its feature tokens) bundled with this binary, and exit. Never contacts a daemon; \`list-commands -J\` serves the same document from a running one]' \
'-h[Print help]' \
'--help[Print help]' \
'-V[Print version]' \
'--version[Print version]' \
'::name -- Named default socket path (par-mux\:\:default_socket_path). Ignored if --socket is set; if absent, `$PAR_MUX_SOCKET` decides before the `default` name does:_default' \
":: :_par-mux_commands" \
"*::: :->par-mux" \
&& ret=0
    case $state in
    (par-mux)
        words=($line[2] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:par-mux-command-$line[2]:"
        case $line[2] in
            (start)
_arguments "${_arguments_options[@]}" : \
'--socket=[Bind an explicit socket path instead of the named default]:PATH:_files' \
'--state-dir=[Override the platform state directory]:DIR:_files' \
'--machine=[Relay this invocation to a saved machine over SSH (the machine'\''s profile in \`\[machines.<label>\]\` names the ssh target; credentials stay with ssh itself). One-shot commands (\`--cmd\`, \`status\`, \`ls\`, \`observe\`, \`control\`, \`--stop\`) run non-interactively; \`attach\` forces passthrough under a pty — the thin client]:LABEL:_default' \
'--foreground[Serve in this process instead of detaching]' \
'--no-attach[Skip the auto-attach of the invoking terminal]' \
'--pane-endpoints[Give each pane its own hook-only socket endpoint]' \
'--expose-control-socket[With --pane-endpoints\: also export the full control socket]' \
'-h[Print help]' \
'--help[Print help]' \
'::name -- Named default socket path:_default' \
&& ret=0
;;
(stop)
_arguments "${_arguments_options[@]}" : \
'--socket=[Connect to an explicit socket path instead of the named default]:PATH:_files' \
'--state-dir=[Override the platform state directory (the registry base for discovery-flavored reads)]:DIR:_files' \
'--machine=[Relay this invocation to a saved machine over SSH (the machine'\''s profile in \`\[machines.<label>\]\` names the ssh target; credentials stay with ssh itself). One-shot commands (\`--cmd\`, \`status\`, \`ls\`, \`observe\`, \`control\`, \`--stop\`) run non-interactively; \`attach\` forces passthrough under a pty — the thin client]:LABEL:_default' \
'-h[Print help]' \
'--help[Print help]' \
'::name -- Named default socket path:_default' \
&& ret=0
;;
(restart)
_arguments "${_arguments_options[@]}" : \
'--socket=[Connect to an explicit socket path instead of the named default]:PATH:_files' \
'--state-dir=[Override the platform state directory (the registry base for discovery-flavored reads)]:DIR:_files' \
'--machine=[Relay this invocation to a saved machine over SSH (the machine'\''s profile in \`\[machines.<label>\]\` names the ssh target; credentials stay with ssh itself). One-shot commands (\`--cmd\`, \`status\`, \`ls\`, \`observe\`, \`control\`, \`--stop\`) run non-interactively; \`attach\` forces passthrough under a pty — the thin client]:LABEL:_default' \
'-h[Print help]' \
'--help[Print help]' \
'::name -- Named default socket path:_default' \
&& ret=0
;;
(status)
_arguments "${_arguments_options[@]}" : \
'--socket=[Connect to an explicit socket path instead of the named default]:PATH:_files' \
'--state-dir=[Override the platform state directory (the registry base for discovery-flavored reads)]:DIR:_files' \
'--machine=[Relay this invocation to a saved machine over SSH (the machine'\''s profile in \`\[machines.<label>\]\` names the ssh target; credentials stay with ssh itself). One-shot commands (\`--cmd\`, \`status\`, \`ls\`, \`observe\`, \`control\`, \`--stop\`) run non-interactively; \`attach\` forces passthrough under a pty — the thin client]:LABEL:_default' \
'-h[Print help]' \
'--help[Print help]' \
'::name -- Named default socket path:_default' \
&& ret=0
;;
(ls)
_arguments "${_arguments_options[@]}" : \
'--socket=[Connect to an explicit socket path instead of the named default]:PATH:_files' \
'--state-dir=[Override the platform state directory (the registry base for discovery-flavored reads)]:DIR:_files' \
'--machine=[Relay this invocation to a saved machine over SSH (the machine'\''s profile in \`\[machines.<label>\]\` names the ssh target; credentials stay with ssh itself). One-shot commands (\`--cmd\`, \`status\`, \`ls\`, \`observe\`, \`control\`, \`--stop\`) run non-interactively; \`attach\` forces passthrough under a pty — the thin client]:LABEL:_default' \
'-h[Print help]' \
'--help[Print help]' \
'::name -- Named default socket path:_default' \
&& ret=0
;;
(attach)
_arguments "${_arguments_options[@]}" : \
'-t+[Initial target (session/window/pane, tmux-style — resolves like a send-keys -t target); Phase A'\''s view attaches to it]:TARGET:_default' \
'--prefix=[Detach prefix key, tmux spelling (e.g. \`C-b\`); Phase A routes it]:KEY:_default' \
'--mode=[Render pipeline\: \`render\` (the default — the Phase B pane renderer with the input router\: mode-aware key re-encode, mouse routing, wheel scrollback) or \`passthrough\` (pane bytes to the host terminal verbatim, Phase A). Absent = the \`\[client\] mode\` from the config file, else render]:MODE:_default' \
'--socket=[Connect to an explicit socket path instead of the named default]:PATH:_files' \
'--machine=[Relay this invocation to a saved machine over SSH (the machine'\''s profile in \`\[machines.<label>\]\` names the ssh target; credentials stay with ssh itself). One-shot commands (\`--cmd\`, \`status\`, \`ls\`, \`observe\`, \`control\`, \`--stop\`) run non-interactively; \`attach\` forces passthrough under a pty — the thin client]:LABEL:_default' \
'-h[Print help]' \
'--help[Print help]' \
'::name -- Named default socket path. Only STARTING a daemon named "attach" needs --socket (the subcommand shadows the NAME form there); attaching by this NAME form works, including for "attach":_default' \
&& ret=0
;;
(config)
_arguments "${_arguments_options[@]}" : \
'--machine=[Relay this invocation to a saved machine over SSH (the machine'\''s profile in \`\[machines.<label>\]\` names the ssh target; credentials stay with ssh itself). One-shot commands (\`--cmd\`, \`status\`, \`ls\`, \`observe\`, \`control\`, \`--stop\`) run non-interactively; \`attach\` forces passthrough under a pty — the thin client]:LABEL:_default' \
'--force[Overwrite an existing config file]' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(observe)
_arguments "${_arguments_options[@]}" : \
'-t+[The pane (\`%N\` or a pane title)]:PANE:_default' \
'--size=[\`control\` only\: report this fixed size (\`WxH\`) instead of following the terminal'\''s]:WxH:_default' \
'--socket=[Connect to an explicit socket path instead of the named default]:PATH:_files' \
'--state-dir=[Override the platform state directory (the registry base for discovery-flavored reads)]:DIR:_files' \
'--machine=[Relay this invocation to a saved machine over SSH (the machine'\''s profile in \`\[machines.<label>\]\` names the ssh target; credentials stay with ssh itself). One-shot commands (\`--cmd\`, \`status\`, \`ls\`, \`observe\`, \`control\`, \`--stop\`) run non-interactively; \`attach\` forces passthrough under a pty — the thin client]:LABEL:_default' \
'--no-seed[Skip the screen seed\: stdout carries only output that follows]' \
'-h[Print help]' \
'--help[Print help]' \
'::name -- Named default socket path:_default' \
&& ret=0
;;
(control)
_arguments "${_arguments_options[@]}" : \
'-t+[The pane (\`%N\` or a pane title)]:PANE:_default' \
'--size=[\`control\` only\: report this fixed size (\`WxH\`) instead of following the terminal'\''s]:WxH:_default' \
'--socket=[Connect to an explicit socket path instead of the named default]:PATH:_files' \
'--state-dir=[Override the platform state directory (the registry base for discovery-flavored reads)]:DIR:_files' \
'--machine=[Relay this invocation to a saved machine over SSH (the machine'\''s profile in \`\[machines.<label>\]\` names the ssh target; credentials stay with ssh itself). One-shot commands (\`--cmd\`, \`status\`, \`ls\`, \`observe\`, \`control\`, \`--stop\`) run non-interactively; \`attach\` forces passthrough under a pty — the thin client]:LABEL:_default' \
'--no-seed[Skip the screen seed\: stdout carries only output that follows]' \
'-h[Print help]' \
'--help[Print help]' \
'::name -- Named default socket path:_default' \
&& ret=0
;;
(completion)
_arguments "${_arguments_options[@]}" : \
'--machine=[Relay this invocation to a saved machine over SSH (the machine'\''s profile in \`\[machines.<label>\]\` names the ssh target; credentials stay with ssh itself). One-shot commands (\`--cmd\`, \`status\`, \`ls\`, \`observe\`, \`control\`, \`--stop\`) run non-interactively; \`attach\` forces passthrough under a pty — the thin client]:LABEL:_default' \
'-h[Print help]' \
'--help[Print help]' \
':shell -- The shell to print for (bash, zsh, fish, powershell, elvish):(bash elvish fish powershell zsh)' \
&& ret=0
;;
(machine)
_arguments "${_arguments_options[@]}" : \
'--machine=[Relay this invocation to a saved machine over SSH (the machine'\''s profile in \`\[machines.<label>\]\` names the ssh target; credentials stay with ssh itself). One-shot commands (\`--cmd\`, \`status\`, \`ls\`, \`observe\`, \`control\`, \`--stop\`) run non-interactively; \`attach\` forces passthrough under a pty — the thin client]:LABEL:_default' \
'-h[Print help]' \
'--help[Print help]' \
":: :_par-mux__subcmd__machine_commands" \
"*::: :->machine" \
&& ret=0

    case $state in
    (machine)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:par-mux-machine-command-$line[1]:"
        case $line[1] in
            (add)
_arguments "${_arguments_options[@]}" : \
'--label=[The machine'\''s label (defaults to the target'\''s host part)]:LABEL:_default' \
'--session=[The remote session \`--machine <LABEL> attach\` lands on]:SESSION:_default' \
'--machine=[Relay this invocation to a saved machine over SSH (the machine'\''s profile in \`\[machines.<label>\]\` names the ssh target; credentials stay with ssh itself). One-shot commands (\`--cmd\`, \`status\`, \`ls\`, \`observe\`, \`control\`, \`--stop\`) run non-interactively; \`attach\` forces passthrough under a pty — the thin client]:LABEL:_default' \
'-h[Print help]' \
'--help[Print help]' \
':target -- The ssh target as openssh spells it (`user@host`, a config alias, `host\:port`):_default' \
&& ret=0
;;
(list)
_arguments "${_arguments_options[@]}" : \
'--machine=[Relay this invocation to a saved machine over SSH (the machine'\''s profile in \`\[machines.<label>\]\` names the ssh target; credentials stay with ssh itself). One-shot commands (\`--cmd\`, \`status\`, \`ls\`, \`observe\`, \`control\`, \`--stop\`) run non-interactively; \`attach\` forces passthrough under a pty — the thin client]:LABEL:_default' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(remove)
_arguments "${_arguments_options[@]}" : \
'--machine=[Relay this invocation to a saved machine over SSH (the machine'\''s profile in \`\[machines.<label>\]\` names the ssh target; credentials stay with ssh itself). One-shot commands (\`--cmd\`, \`status\`, \`ls\`, \`observe\`, \`control\`, \`--stop\`) run non-interactively; \`attach\` forces passthrough under a pty — the thin client]:LABEL:_default' \
'-h[Print help]' \
'--help[Print help]' \
':label:_default' \
&& ret=0
;;
(rename)
_arguments "${_arguments_options[@]}" : \
'--to=[]:TO:_default' \
'--machine=[Relay this invocation to a saved machine over SSH (the machine'\''s profile in \`\[machines.<label>\]\` names the ssh target; credentials stay with ssh itself). One-shot commands (\`--cmd\`, \`status\`, \`ls\`, \`observe\`, \`control\`, \`--stop\`) run non-interactively; \`attach\` forces passthrough under a pty — the thin client]:LABEL:_default' \
'-h[Print help]' \
'--help[Print help]' \
':label:_default' \
&& ret=0
;;
(enable)
_arguments "${_arguments_options[@]}" : \
'--machine=[Relay this invocation to a saved machine over SSH (the machine'\''s profile in \`\[machines.<label>\]\` names the ssh target; credentials stay with ssh itself). One-shot commands (\`--cmd\`, \`status\`, \`ls\`, \`observe\`, \`control\`, \`--stop\`) run non-interactively; \`attach\` forces passthrough under a pty — the thin client]:LABEL:_default' \
'-h[Print help]' \
'--help[Print help]' \
':label:_default' \
&& ret=0
;;
(disable)
_arguments "${_arguments_options[@]}" : \
'--machine=[Relay this invocation to a saved machine over SSH (the machine'\''s profile in \`\[machines.<label>\]\` names the ssh target; credentials stay with ssh itself). One-shot commands (\`--cmd\`, \`status\`, \`ls\`, \`observe\`, \`control\`, \`--stop\`) run non-interactively; \`attach\` forces passthrough under a pty — the thin client]:LABEL:_default' \
'-h[Print help]' \
'--help[Print help]' \
':label:_default' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_par-mux__subcmd__machine__subcmd__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:par-mux-machine-help-command-$line[1]:"
        case $line[1] in
            (add)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(list)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(remove)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(rename)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(enable)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(disable)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
;;
(plugin)
_arguments "${_arguments_options[@]}" : \
'--machine=[Relay this invocation to a saved machine over SSH (the machine'\''s profile in \`\[machines.<label>\]\` names the ssh target; credentials stay with ssh itself). One-shot commands (\`--cmd\`, \`status\`, \`ls\`, \`observe\`, \`control\`, \`--stop\`) run non-interactively; \`attach\` forces passthrough under a pty — the thin client]:LABEL:_default' \
'-h[Print help]' \
'--help[Print help]' \
":: :_par-mux__subcmd__plugin_commands" \
"*::: :->plugin" \
&& ret=0

    case $state in
    (plugin)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:par-mux-plugin-command-$line[1]:"
        case $line[1] in
            (install)
_arguments "${_arguments_options[@]}" : \
'--machine=[Relay this invocation to a saved machine over SSH (the machine'\''s profile in \`\[machines.<label>\]\` names the ssh target; credentials stay with ssh itself). One-shot commands (\`--cmd\`, \`status\`, \`ls\`, \`observe\`, \`control\`, \`--stop\`) run non-interactively; \`attach\` forces passthrough under a pty — the thin client]:LABEL:_default' \
'--trust[Trust the previewed commands and install]' \
'-h[Print help]' \
'--help[Print help]' \
':source -- A plugin directory or a git URL (depth-1 clone; the manifest at the root or one level down):_default' \
&& ret=0
;;
(list)
_arguments "${_arguments_options[@]}" : \
'--machine=[Relay this invocation to a saved machine over SSH (the machine'\''s profile in \`\[machines.<label>\]\` names the ssh target; credentials stay with ssh itself). One-shot commands (\`--cmd\`, \`status\`, \`ls\`, \`observe\`, \`control\`, \`--stop\`) run non-interactively; \`attach\` forces passthrough under a pty — the thin client]:LABEL:_default' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(remove)
_arguments "${_arguments_options[@]}" : \
'--machine=[Relay this invocation to a saved machine over SSH (the machine'\''s profile in \`\[machines.<label>\]\` names the ssh target; credentials stay with ssh itself). One-shot commands (\`--cmd\`, \`status\`, \`ls\`, \`observe\`, \`control\`, \`--stop\`) run non-interactively; \`attach\` forces passthrough under a pty — the thin client]:LABEL:_default' \
'-h[Print help]' \
'--help[Print help]' \
':name:_default' \
&& ret=0
;;
(update)
_arguments "${_arguments_options[@]}" : \
'--machine=[Relay this invocation to a saved machine over SSH (the machine'\''s profile in \`\[machines.<label>\]\` names the ssh target; credentials stay with ssh itself). One-shot commands (\`--cmd\`, \`status\`, \`ls\`, \`observe\`, \`control\`, \`--stop\`) run non-interactively; \`attach\` forces passthrough under a pty — the thin client]:LABEL:_default' \
'--trust[]' \
'-h[Print help]' \
'--help[Print help]' \
':name:_default' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_par-mux__subcmd__plugin__subcmd__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:par-mux-plugin-help-command-$line[1]:"
        case $line[1] in
            (install)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(list)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(remove)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(update)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
;;
(update)
_arguments "${_arguments_options[@]}" : \
'--channel=[The release channel\: \`stable\` (latest release, the default) or \`preview\` (newest prerelease)]:CHANNEL:((stable\:"The latest non-prerelease release"
preview\:"The newest prerelease, falling back to stable when none exists"))' \
'--machine=[Relay this invocation to a saved machine over SSH (the machine'\''s profile in \`\[machines.<label>\]\` names the ssh target; credentials stay with ssh itself). One-shot commands (\`--cmd\`, \`status\`, \`ls\`, \`observe\`, \`control\`, \`--stop\`) run non-interactively; \`attach\` forces passthrough under a pty — the thin client]:LABEL:_default' \
'--check[Report what would install, touch nothing]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_par-mux__subcmd__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:par-mux-help-command-$line[1]:"
        case $line[1] in
            (start)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(stop)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(restart)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(status)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(ls)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(attach)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(config)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(observe)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(control)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(completion)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(machine)
_arguments "${_arguments_options[@]}" : \
":: :_par-mux__subcmd__help__subcmd__machine_commands" \
"*::: :->machine" \
&& ret=0

    case $state in
    (machine)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:par-mux-help-machine-command-$line[1]:"
        case $line[1] in
            (add)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(list)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(remove)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(rename)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(enable)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(disable)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
(plugin)
_arguments "${_arguments_options[@]}" : \
":: :_par-mux__subcmd__help__subcmd__plugin_commands" \
"*::: :->plugin" \
&& ret=0

    case $state in
    (plugin)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:par-mux-help-plugin-command-$line[1]:"
        case $line[1] in
            (install)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(list)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(remove)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(update)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
(update)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
}

(( $+functions[_par-mux_commands] )) ||
_par-mux_commands() {
    local commands; commands=(
'start:Start the daemon (the default action)\: detached, auto-attaching this terminal unless --no-attach. Same as bare \`par-mux \[NAME\]\`' \
'stop:Stop the daemon serving the resolved socket cleanly. Same as \`--stop\`' \
'restart:Stop, then start a fresh daemon that restores the saved tree. Same as \`--restart\`' \
'status:One-shot orientation\: the daemon'\''s build stamp, its workspaces and sessions, the displayed session, and the pane count — the orient step in one invocation (R2)' \
'ls:List the resolved daemon'\''s sessions (\`list-sessions\`, tmux'\''s \`ls\`)' \
'attach:Attach a client to a running daemon; never starts one. The feature-gated interactive client' \
'config:Write the config file with the current effective settings. Same as \`--gen-config\` (add \`--force\` to overwrite)' \
'observe:Stream one pane'\''s raw output to stdout, read-only (\`observe-pane\`)\: the screen seed, then live PTY bytes until the pane closes. Any number of observers may watch the same pane' \
'control:Drive one pane (\`control-pane\`)\: stream its output to stdout like \`observe\`, forward stdin bytes to it until EOF (no raw mode — for pipes and scripts; interactive use is \`attach -t %N\`), and report this terminal'\''s size (polled) or \`--size\` as a viewer of the pane'\''s window' \
'completion:Print the shell-completion script for SHELL, herdr'\''s spelling of \`--print-completions\`. Never contacts a daemon' \
'machine:Manage saved machines (\`\[machines.<label>\]\` in the config)\: SSH thin-client profiles for \`--machine\`. Never contacts a daemon' \
'plugin:Manage plugins\: manifests under the state dir'\''s \`plugins/\` whose hooks run on daemon events. Install previews every command; nothing runs until \`--trust\`. Never contacts a daemon' \
'update:Check for a newer release and install it (self-update)\: resolve the channel, download the platform archive, verify the binary, replace this one, restart the daemon (its sessions ride the stop-and-restore handoff)' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'par-mux commands' commands "$@"
}
(( $+functions[_par-mux__subcmd__attach_commands] )) ||
_par-mux__subcmd__attach_commands() {
    local commands; commands=()
    _describe -t commands 'par-mux attach commands' commands "$@"
}
(( $+functions[_par-mux__subcmd__completion_commands] )) ||
_par-mux__subcmd__completion_commands() {
    local commands; commands=()
    _describe -t commands 'par-mux completion commands' commands "$@"
}
(( $+functions[_par-mux__subcmd__config_commands] )) ||
_par-mux__subcmd__config_commands() {
    local commands; commands=()
    _describe -t commands 'par-mux config commands' commands "$@"
}
(( $+functions[_par-mux__subcmd__control_commands] )) ||
_par-mux__subcmd__control_commands() {
    local commands; commands=()
    _describe -t commands 'par-mux control commands' commands "$@"
}
(( $+functions[_par-mux__subcmd__help_commands] )) ||
_par-mux__subcmd__help_commands() {
    local commands; commands=(
'start:Start the daemon (the default action)\: detached, auto-attaching this terminal unless --no-attach. Same as bare \`par-mux \[NAME\]\`' \
'stop:Stop the daemon serving the resolved socket cleanly. Same as \`--stop\`' \
'restart:Stop, then start a fresh daemon that restores the saved tree. Same as \`--restart\`' \
'status:One-shot orientation\: the daemon'\''s build stamp, its workspaces and sessions, the displayed session, and the pane count — the orient step in one invocation (R2)' \
'ls:List the resolved daemon'\''s sessions (\`list-sessions\`, tmux'\''s \`ls\`)' \
'attach:Attach a client to a running daemon; never starts one. The feature-gated interactive client' \
'config:Write the config file with the current effective settings. Same as \`--gen-config\` (add \`--force\` to overwrite)' \
'observe:Stream one pane'\''s raw output to stdout, read-only (\`observe-pane\`)\: the screen seed, then live PTY bytes until the pane closes. Any number of observers may watch the same pane' \
'control:Drive one pane (\`control-pane\`)\: stream its output to stdout like \`observe\`, forward stdin bytes to it until EOF (no raw mode — for pipes and scripts; interactive use is \`attach -t %N\`), and report this terminal'\''s size (polled) or \`--size\` as a viewer of the pane'\''s window' \
'completion:Print the shell-completion script for SHELL, herdr'\''s spelling of \`--print-completions\`. Never contacts a daemon' \
'machine:Manage saved machines (\`\[machines.<label>\]\` in the config)\: SSH thin-client profiles for \`--machine\`. Never contacts a daemon' \
'plugin:Manage plugins\: manifests under the state dir'\''s \`plugins/\` whose hooks run on daemon events. Install previews every command; nothing runs until \`--trust\`. Never contacts a daemon' \
'update:Check for a newer release and install it (self-update)\: resolve the channel, download the platform archive, verify the binary, replace this one, restart the daemon (its sessions ride the stop-and-restore handoff)' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'par-mux help commands' commands "$@"
}
(( $+functions[_par-mux__subcmd__help__subcmd__attach_commands] )) ||
_par-mux__subcmd__help__subcmd__attach_commands() {
    local commands; commands=()
    _describe -t commands 'par-mux help attach commands' commands "$@"
}
(( $+functions[_par-mux__subcmd__help__subcmd__completion_commands] )) ||
_par-mux__subcmd__help__subcmd__completion_commands() {
    local commands; commands=()
    _describe -t commands 'par-mux help completion commands' commands "$@"
}
(( $+functions[_par-mux__subcmd__help__subcmd__config_commands] )) ||
_par-mux__subcmd__help__subcmd__config_commands() {
    local commands; commands=()
    _describe -t commands 'par-mux help config commands' commands "$@"
}
(( $+functions[_par-mux__subcmd__help__subcmd__control_commands] )) ||
_par-mux__subcmd__help__subcmd__control_commands() {
    local commands; commands=()
    _describe -t commands 'par-mux help control commands' commands "$@"
}
(( $+functions[_par-mux__subcmd__help__subcmd__help_commands] )) ||
_par-mux__subcmd__help__subcmd__help_commands() {
    local commands; commands=()
    _describe -t commands 'par-mux help help commands' commands "$@"
}
(( $+functions[_par-mux__subcmd__help__subcmd__ls_commands] )) ||
_par-mux__subcmd__help__subcmd__ls_commands() {
    local commands; commands=()
    _describe -t commands 'par-mux help ls commands' commands "$@"
}
(( $+functions[_par-mux__subcmd__help__subcmd__machine_commands] )) ||
_par-mux__subcmd__help__subcmd__machine_commands() {
    local commands; commands=(
'add:Save \`\[machines.<LABEL>\]\` (or replace it)\: the ssh target, an optional default remote session, enabled by default. Nothing is contacted — the first attach relays whenever ssh is ready' \
'list:One line per saved machine\: \`label  target  \[session\]  enabled|disabled\`' \
'remove:Remove a machine'\''s profile (remote sessions keep running)' \
'rename:Rename a machine'\''s label' \
'enable:Mark a machine enabled' \
'disable:Mark a machine disabled (listed, never auto-attached)' \
    )
    _describe -t commands 'par-mux help machine commands' commands "$@"
}
(( $+functions[_par-mux__subcmd__help__subcmd__machine__subcmd__add_commands] )) ||
_par-mux__subcmd__help__subcmd__machine__subcmd__add_commands() {
    local commands; commands=()
    _describe -t commands 'par-mux help machine add commands' commands "$@"
}
(( $+functions[_par-mux__subcmd__help__subcmd__machine__subcmd__disable_commands] )) ||
_par-mux__subcmd__help__subcmd__machine__subcmd__disable_commands() {
    local commands; commands=()
    _describe -t commands 'par-mux help machine disable commands' commands "$@"
}
(( $+functions[_par-mux__subcmd__help__subcmd__machine__subcmd__enable_commands] )) ||
_par-mux__subcmd__help__subcmd__machine__subcmd__enable_commands() {
    local commands; commands=()
    _describe -t commands 'par-mux help machine enable commands' commands "$@"
}
(( $+functions[_par-mux__subcmd__help__subcmd__machine__subcmd__list_commands] )) ||
_par-mux__subcmd__help__subcmd__machine__subcmd__list_commands() {
    local commands; commands=()
    _describe -t commands 'par-mux help machine list commands' commands "$@"
}
(( $+functions[_par-mux__subcmd__help__subcmd__machine__subcmd__remove_commands] )) ||
_par-mux__subcmd__help__subcmd__machine__subcmd__remove_commands() {
    local commands; commands=()
    _describe -t commands 'par-mux help machine remove commands' commands "$@"
}
(( $+functions[_par-mux__subcmd__help__subcmd__machine__subcmd__rename_commands] )) ||
_par-mux__subcmd__help__subcmd__machine__subcmd__rename_commands() {
    local commands; commands=()
    _describe -t commands 'par-mux help machine rename commands' commands "$@"
}
(( $+functions[_par-mux__subcmd__help__subcmd__observe_commands] )) ||
_par-mux__subcmd__help__subcmd__observe_commands() {
    local commands; commands=()
    _describe -t commands 'par-mux help observe commands' commands "$@"
}
(( $+functions[_par-mux__subcmd__help__subcmd__plugin_commands] )) ||
_par-mux__subcmd__help__subcmd__plugin_commands() {
    local commands; commands=(
'install:Resolve a plugin source (a directory or git URL) and PREVIEW it\: the source, its identity, and every command an event would run. Installs only with \`--trust\`' \
'list:One line per installed plugin\: name, version, hook count, source' \
'remove:Remove a plugin (its hooks stop after the daemon reloads)' \
'update:Re-fetch a plugin from its recorded source (the preview and \`--trust\` apply again)' \
    )
    _describe -t commands 'par-mux help plugin commands' commands "$@"
}
(( $+functions[_par-mux__subcmd__help__subcmd__plugin__subcmd__install_commands] )) ||
_par-mux__subcmd__help__subcmd__plugin__subcmd__install_commands() {
    local commands; commands=()
    _describe -t commands 'par-mux help plugin install commands' commands "$@"
}
(( $+functions[_par-mux__subcmd__help__subcmd__plugin__subcmd__list_commands] )) ||
_par-mux__subcmd__help__subcmd__plugin__subcmd__list_commands() {
    local commands; commands=()
    _describe -t commands 'par-mux help plugin list commands' commands "$@"
}
(( $+functions[_par-mux__subcmd__help__subcmd__plugin__subcmd__remove_commands] )) ||
_par-mux__subcmd__help__subcmd__plugin__subcmd__remove_commands() {
    local commands; commands=()
    _describe -t commands 'par-mux help plugin remove commands' commands "$@"
}
(( $+functions[_par-mux__subcmd__help__subcmd__plugin__subcmd__update_commands] )) ||
_par-mux__subcmd__help__subcmd__plugin__subcmd__update_commands() {
    local commands; commands=()
    _describe -t commands 'par-mux help plugin update commands' commands "$@"
}
(( $+functions[_par-mux__subcmd__help__subcmd__restart_commands] )) ||
_par-mux__subcmd__help__subcmd__restart_commands() {
    local commands; commands=()
    _describe -t commands 'par-mux help restart commands' commands "$@"
}
(( $+functions[_par-mux__subcmd__help__subcmd__start_commands] )) ||
_par-mux__subcmd__help__subcmd__start_commands() {
    local commands; commands=()
    _describe -t commands 'par-mux help start commands' commands "$@"
}
(( $+functions[_par-mux__subcmd__help__subcmd__status_commands] )) ||
_par-mux__subcmd__help__subcmd__status_commands() {
    local commands; commands=()
    _describe -t commands 'par-mux help status commands' commands "$@"
}
(( $+functions[_par-mux__subcmd__help__subcmd__stop_commands] )) ||
_par-mux__subcmd__help__subcmd__stop_commands() {
    local commands; commands=()
    _describe -t commands 'par-mux help stop commands' commands "$@"
}
(( $+functions[_par-mux__subcmd__help__subcmd__update_commands] )) ||
_par-mux__subcmd__help__subcmd__update_commands() {
    local commands; commands=()
    _describe -t commands 'par-mux help update commands' commands "$@"
}
(( $+functions[_par-mux__subcmd__ls_commands] )) ||
_par-mux__subcmd__ls_commands() {
    local commands; commands=()
    _describe -t commands 'par-mux ls commands' commands "$@"
}
(( $+functions[_par-mux__subcmd__machine_commands] )) ||
_par-mux__subcmd__machine_commands() {
    local commands; commands=(
'add:Save \`\[machines.<LABEL>\]\` (or replace it)\: the ssh target, an optional default remote session, enabled by default. Nothing is contacted — the first attach relays whenever ssh is ready' \
'list:One line per saved machine\: \`label  target  \[session\]  enabled|disabled\`' \
'remove:Remove a machine'\''s profile (remote sessions keep running)' \
'rename:Rename a machine'\''s label' \
'enable:Mark a machine enabled' \
'disable:Mark a machine disabled (listed, never auto-attached)' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'par-mux machine commands' commands "$@"
}
(( $+functions[_par-mux__subcmd__machine__subcmd__add_commands] )) ||
_par-mux__subcmd__machine__subcmd__add_commands() {
    local commands; commands=()
    _describe -t commands 'par-mux machine add commands' commands "$@"
}
(( $+functions[_par-mux__subcmd__machine__subcmd__disable_commands] )) ||
_par-mux__subcmd__machine__subcmd__disable_commands() {
    local commands; commands=()
    _describe -t commands 'par-mux machine disable commands' commands "$@"
}
(( $+functions[_par-mux__subcmd__machine__subcmd__enable_commands] )) ||
_par-mux__subcmd__machine__subcmd__enable_commands() {
    local commands; commands=()
    _describe -t commands 'par-mux machine enable commands' commands "$@"
}
(( $+functions[_par-mux__subcmd__machine__subcmd__help_commands] )) ||
_par-mux__subcmd__machine__subcmd__help_commands() {
    local commands; commands=(
'add:Save \`\[machines.<LABEL>\]\` (or replace it)\: the ssh target, an optional default remote session, enabled by default. Nothing is contacted — the first attach relays whenever ssh is ready' \
'list:One line per saved machine\: \`label  target  \[session\]  enabled|disabled\`' \
'remove:Remove a machine'\''s profile (remote sessions keep running)' \
'rename:Rename a machine'\''s label' \
'enable:Mark a machine enabled' \
'disable:Mark a machine disabled (listed, never auto-attached)' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'par-mux machine help commands' commands "$@"
}
(( $+functions[_par-mux__subcmd__machine__subcmd__help__subcmd__add_commands] )) ||
_par-mux__subcmd__machine__subcmd__help__subcmd__add_commands() {
    local commands; commands=()
    _describe -t commands 'par-mux machine help add commands' commands "$@"
}
(( $+functions[_par-mux__subcmd__machine__subcmd__help__subcmd__disable_commands] )) ||
_par-mux__subcmd__machine__subcmd__help__subcmd__disable_commands() {
    local commands; commands=()
    _describe -t commands 'par-mux machine help disable commands' commands "$@"
}
(( $+functions[_par-mux__subcmd__machine__subcmd__help__subcmd__enable_commands] )) ||
_par-mux__subcmd__machine__subcmd__help__subcmd__enable_commands() {
    local commands; commands=()
    _describe -t commands 'par-mux machine help enable commands' commands "$@"
}
(( $+functions[_par-mux__subcmd__machine__subcmd__help__subcmd__help_commands] )) ||
_par-mux__subcmd__machine__subcmd__help__subcmd__help_commands() {
    local commands; commands=()
    _describe -t commands 'par-mux machine help help commands' commands "$@"
}
(( $+functions[_par-mux__subcmd__machine__subcmd__help__subcmd__list_commands] )) ||
_par-mux__subcmd__machine__subcmd__help__subcmd__list_commands() {
    local commands; commands=()
    _describe -t commands 'par-mux machine help list commands' commands "$@"
}
(( $+functions[_par-mux__subcmd__machine__subcmd__help__subcmd__remove_commands] )) ||
_par-mux__subcmd__machine__subcmd__help__subcmd__remove_commands() {
    local commands; commands=()
    _describe -t commands 'par-mux machine help remove commands' commands "$@"
}
(( $+functions[_par-mux__subcmd__machine__subcmd__help__subcmd__rename_commands] )) ||
_par-mux__subcmd__machine__subcmd__help__subcmd__rename_commands() {
    local commands; commands=()
    _describe -t commands 'par-mux machine help rename commands' commands "$@"
}
(( $+functions[_par-mux__subcmd__machine__subcmd__list_commands] )) ||
_par-mux__subcmd__machine__subcmd__list_commands() {
    local commands; commands=()
    _describe -t commands 'par-mux machine list commands' commands "$@"
}
(( $+functions[_par-mux__subcmd__machine__subcmd__remove_commands] )) ||
_par-mux__subcmd__machine__subcmd__remove_commands() {
    local commands; commands=()
    _describe -t commands 'par-mux machine remove commands' commands "$@"
}
(( $+functions[_par-mux__subcmd__machine__subcmd__rename_commands] )) ||
_par-mux__subcmd__machine__subcmd__rename_commands() {
    local commands; commands=()
    _describe -t commands 'par-mux machine rename commands' commands "$@"
}
(( $+functions[_par-mux__subcmd__observe_commands] )) ||
_par-mux__subcmd__observe_commands() {
    local commands; commands=()
    _describe -t commands 'par-mux observe commands' commands "$@"
}
(( $+functions[_par-mux__subcmd__plugin_commands] )) ||
_par-mux__subcmd__plugin_commands() {
    local commands; commands=(
'install:Resolve a plugin source (a directory or git URL) and PREVIEW it\: the source, its identity, and every command an event would run. Installs only with \`--trust\`' \
'list:One line per installed plugin\: name, version, hook count, source' \
'remove:Remove a plugin (its hooks stop after the daemon reloads)' \
'update:Re-fetch a plugin from its recorded source (the preview and \`--trust\` apply again)' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'par-mux plugin commands' commands "$@"
}
(( $+functions[_par-mux__subcmd__plugin__subcmd__help_commands] )) ||
_par-mux__subcmd__plugin__subcmd__help_commands() {
    local commands; commands=(
'install:Resolve a plugin source (a directory or git URL) and PREVIEW it\: the source, its identity, and every command an event would run. Installs only with \`--trust\`' \
'list:One line per installed plugin\: name, version, hook count, source' \
'remove:Remove a plugin (its hooks stop after the daemon reloads)' \
'update:Re-fetch a plugin from its recorded source (the preview and \`--trust\` apply again)' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'par-mux plugin help commands' commands "$@"
}
(( $+functions[_par-mux__subcmd__plugin__subcmd__help__subcmd__help_commands] )) ||
_par-mux__subcmd__plugin__subcmd__help__subcmd__help_commands() {
    local commands; commands=()
    _describe -t commands 'par-mux plugin help help commands' commands "$@"
}
(( $+functions[_par-mux__subcmd__plugin__subcmd__help__subcmd__install_commands] )) ||
_par-mux__subcmd__plugin__subcmd__help__subcmd__install_commands() {
    local commands; commands=()
    _describe -t commands 'par-mux plugin help install commands' commands "$@"
}
(( $+functions[_par-mux__subcmd__plugin__subcmd__help__subcmd__list_commands] )) ||
_par-mux__subcmd__plugin__subcmd__help__subcmd__list_commands() {
    local commands; commands=()
    _describe -t commands 'par-mux plugin help list commands' commands "$@"
}
(( $+functions[_par-mux__subcmd__plugin__subcmd__help__subcmd__remove_commands] )) ||
_par-mux__subcmd__plugin__subcmd__help__subcmd__remove_commands() {
    local commands; commands=()
    _describe -t commands 'par-mux plugin help remove commands' commands "$@"
}
(( $+functions[_par-mux__subcmd__plugin__subcmd__help__subcmd__update_commands] )) ||
_par-mux__subcmd__plugin__subcmd__help__subcmd__update_commands() {
    local commands; commands=()
    _describe -t commands 'par-mux plugin help update commands' commands "$@"
}
(( $+functions[_par-mux__subcmd__plugin__subcmd__install_commands] )) ||
_par-mux__subcmd__plugin__subcmd__install_commands() {
    local commands; commands=()
    _describe -t commands 'par-mux plugin install commands' commands "$@"
}
(( $+functions[_par-mux__subcmd__plugin__subcmd__list_commands] )) ||
_par-mux__subcmd__plugin__subcmd__list_commands() {
    local commands; commands=()
    _describe -t commands 'par-mux plugin list commands' commands "$@"
}
(( $+functions[_par-mux__subcmd__plugin__subcmd__remove_commands] )) ||
_par-mux__subcmd__plugin__subcmd__remove_commands() {
    local commands; commands=()
    _describe -t commands 'par-mux plugin remove commands' commands "$@"
}
(( $+functions[_par-mux__subcmd__plugin__subcmd__update_commands] )) ||
_par-mux__subcmd__plugin__subcmd__update_commands() {
    local commands; commands=()
    _describe -t commands 'par-mux plugin update commands' commands "$@"
}
(( $+functions[_par-mux__subcmd__restart_commands] )) ||
_par-mux__subcmd__restart_commands() {
    local commands; commands=()
    _describe -t commands 'par-mux restart commands' commands "$@"
}
(( $+functions[_par-mux__subcmd__start_commands] )) ||
_par-mux__subcmd__start_commands() {
    local commands; commands=()
    _describe -t commands 'par-mux start commands' commands "$@"
}
(( $+functions[_par-mux__subcmd__status_commands] )) ||
_par-mux__subcmd__status_commands() {
    local commands; commands=()
    _describe -t commands 'par-mux status commands' commands "$@"
}
(( $+functions[_par-mux__subcmd__stop_commands] )) ||
_par-mux__subcmd__stop_commands() {
    local commands; commands=()
    _describe -t commands 'par-mux stop commands' commands "$@"
}
(( $+functions[_par-mux__subcmd__update_commands] )) ||
_par-mux__subcmd__update_commands() {
    local commands; commands=()
    _describe -t commands 'par-mux update commands' commands "$@"
}

if [ "$funcstack[1]" = "_par-mux" ]; then
    _par-mux "$@"
else
    compdef _par-mux par-mux
fi
