# LibTmux::Command

- **Package:** LibTmux
- **Language:** Raku
- **Kind:** module
- **Source:** https://github.com/libtmux/libtmux-raku/blob/e76160bcce6e03976d49424da15b7c31afb2c68e/lib/LibTmux/Command.rakumod#L3
- **Page:** https://libtmux.org/en/raku/latest/reference/libtmux-command/

# Interpretation boundaries

Invocation encodes a tmux command, not a shell command or a FORMAT literal.
Double quoting alone does not suppress tmux tilde expansion. Exact octal
escapes preserve quotes, backslashes, dollars, tildes, controls and high bytes.
The encoded size limit applies after expansion and before dispatch.

Engine code inserts command separators deliberately between Invocation values;
literal semicolons inside their argument values remain data. Commands which
interpret FORMAT syntax require an additional command-specific policy.



# Single-operation admission

Effectful entry points use ` is single-operation ` to reject Junction arguments
before Raku can autothread a typed method into several operations. Unknown named
arguments are rejected unless the method explicitly forwards a slurpy options
hash; the receiving operation validates those forwarded names. Nested command
operands remain the responsibility of Invocation and the command's validators.
Native signatures, defaults and constraints retain their normal binding rules.
An effectful multi must guard its explicit proto, since candidate dispatch can
autothread before a wrapper on an individual candidate runs.
Role methods use capture admission in the proto body before typed candidate
dispatch. Wrapping an unspecialized role method loses its private-method context
after precompilation on the pinned compiler.

` is single-operation('async') ` returns one broken Promise for rejected input or
a synchronous exception from the method. Junctions and unknown names produce
` X::LibTmux::Command ` with ` kind ` argument and ` outcome ` NotStarted. Native
binding errors and exceptions from the body retain their types. An accepted
method's Promise passes through unchanged. Portable query validation keeps its
own ` InvalidFilter ` policy, while local selections retain native Junction
matching.

## Members

### Other members

- [`Invocation`](/en/raku/latest/reference/libtmux-command-invocation/) (class): One copied tmux command with distinct argv and command-language encodings.
