Server.BuildGuardedCommandLine
Builds the argument vector for a raw tmux invocation that only takes effect while the named server generation is still current.
Source and package
- Module
- LibTmux
- Declared in
- Server
- Package
- LibTmux
- Source
- src/LibTmux/Server.Command.cs
- BuildGuardedCommandLine ( expected : Server
Generation , mismatchCommand : string , IReadOnlyList<string>[] : IReadOnly <string> , commands ) IReadList Only <string>List -
Description#
A command this library dispatches itself is already guarded by
RequiredGenerationthroughChain. This is for the one case that cannot go through that dispatch -- an interactive attach, which must run as its own foreground process to inherit the caller's terminal, so the guard has to travel inside the argument vector instead.- Parameters
-
-
expected ( Server
Generation ) – The generation the command requires. -
mismatchCommand ( string ) – A tmux command run instead when the generation has changed. The caller already committed to spawning a process expecting
expected, so this is typically one that fails loudly rather than one that repairs anything. -
commands – One or more tmux commands to run when the generation still matches, each its own argument vector.
-
- Returns
-
The encoded arguments. Prepend
EndpointArgumentsbefore passing this to a process started atTmuxBinaryPath.