Core LibraryAPI Reference

Choose documentation 2

latest

Current version

latest
English

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

cmdlet libtmux-powershell latest

LibTmux.Invoke-TmuxChain

LibTmux\Invoke-TmuxChain LibTmux\Invoke-TmuxChain

Execute an ordered command chain against one server.

Source and package
Declared in
LibTmux
Package
LibTmux
Source
src/LibTmux.PowerShell/InvokeTmuxChainCommand.cs

Description#

Execute an explicit array of native commands in order and return one merged TmuxCommandResult . Native generation and window-placement guards are retained. An empty server pipeline performs no work. Admission validates the complete array before confirmation or dispatch.

A failed command stops the remaining chain; earlier mutations remain. The result is merged stdout/stderr, not one receipt per command. Chains are not transactions. Cancellation cannot undo a command already sent to tmux.

Notes

Tmux.InvalidChain terminates invalid admission. Tmux.ChainFailed retains the native failure and server target. ErrorAction Continue permits later servers to run; Stop terminates. WhatIf dispatches nothing. Do not automatically retry an uncertain mutation.

Command details#

Command type
cmdlet
Confirmation
Supports -WhatIf and -Confirm ; confirm impact: Medium.
Positional binding
Enabled.
Pipeline inputs
LibTmux.Server : The native server to execute against.
Outputs
LibTmux.TmuxCommandResult

Examples#

Example 1 Print two values in order on a previously selected $server . View source

Terminal window
$commands = 'first', 'second' | ForEach-Object {
LibTmux\New-TmuxCommand -Name 'display-message' -Arguments @('-p', $_)
}
$server | LibTmux\Invoke-TmuxChain -Command $commands
Parameters
Common parameters 12

PowerShell supplies these parameters. See common parameter behavior for their effects.

Returns

LibTmux.TmuxCommandResult : One native merged result after success.

Discussed in Getting started · Dispatch, completion, and failure

Esc

Type to search.

Reference preview Open reference