Core LibraryAPI Reference

Choose documentation 3

latest

Current version

latest
English

Prerelease This site documents an alpha of libtmux. Its structure, URLs and APIs are subject to change.

C# API

method libtmux-dotnet latest

Server.BuildGuardedCommandLine

Namespace LibTmux.Server.BuildGuardedCommandLine LibTmux

Builds the argument vector for a raw tmux invocation that only takes effect while the named server generation is still current.

View as Markdown

Source and package
Module
LibTmux
Declared in
Server
Package
LibTmux
Source
src/LibTmux/Server.Command.cs
BuildGuardedCommandLine ( expected : ServerGeneration , mismatchCommand : string , IReadOnlyList<string>[] : IReadOnlyList<string> , commands ) → IReadOnlyList<string>
methodstatic [source]

Description#

A command this library dispatches itself is already guarded by RequiredGeneration through Chain . 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 ( ServerGeneration ) – 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 EndpointArguments before passing this to a process started at TmuxBinaryPath .

Esc

Type to search.