CommandRequest
One tmux invocation: how to reach the server, then the commands to run there.
Source and package
- Qualified name
-
io.github .libtmux .transport. Command Request - Package
- io.github.libtmux.transport
- Distribution
- io.github.libtmux:libtmux
- Source
- libtmux/src/main/java/io/github/libtmux/transport/CommandRequest.java
-
Description#
Commands are held literally. tmux ends a command at an argument whose last byte is
;, so a value ending in one would otherwise be truncated with no error; a transport encodes for the parser it feeds, and#commands()answers with what the caller meant.The timeout rides on the request instead of the transport because the same server serves both a listing that should answer immediately and an attach that never returns.
- Parameters
-
-
endpoint(List<String>) # – the tmux executable and its server selection, such as[tmux, -S, path]. tmux reads these before it parses commands, so they are passed through untouched -
commands(List<List<String>>) # – one or more tmux commands, each an argv of literal words. tmux runs them in order and discards the rest after the first failure -
timeout(Duration) # – how long the caller will wait for the whole invocation -
input(String) # – what the commands read from tmux's standard input, empty for the commands that read none. A tmux argument is bounded by MAX_IMSGSIZE, so text too large to be one travels here instead. -
discardStdout(boolean) # – whether the caller reads only the exit status and standard error. tmux 3.0 and 3.1 keep the client's standard output open after the client exits; a request that needs none of it says so and the transport never opens the pipe. The process transport honours it, so the output is empty; a transport that does not still returns once the process has exited
-
Members10#
- commandLine method The full argv to hand a process builder, encoded for tmux's own argv parser.
- CommandRequest method A request whose standard output is read like any other.
- commands method one or more tmux commands, each an argv of literal words. tmux runs them in order and discards the rest after the first failure
- discardStdout method whether the caller reads only the exit status and standard error. tmux 3.0 and 3.1 keep the client's standard output open after the client exits; a request that needs none of it says so and the transport never opens the pipe. The process transport honours it, so the output is empty; a transport that does not still returns once the process has exited
- endpoint method the tmux executable and its server selection, such as
[tmux, -S, path]. tmux reads these before it parses commands, so they are passed through untouched - idempotence method Whether sending this request twice leaves tmux as sending it once does:
Idempotence.IDEMPOTENTonly when every command in it reads. - input method what the commands read from tmux's standard input, empty for the commands that read none. A tmux argument is bounded by MAX_IMSGSIZE, so text too large to be one travels here instead.
- of method A request for one command, which is every request but a batch.
- timeout method how long the caller will wait for the whole invocation
- toString method Counts only. Commands carry pane content and socket paths, and this value reaches log lines and failed assertions.