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-TmuxCommand

LibTmux\Invoke-TmuxCommand LibTmux\Invoke-TmuxCommand

Execute literal tmux arguments against an explicit server.

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

Description#

Pass the tmux command name and arguments as a string array. The adapter invokes the core directly without a shell. It returns a native TmuxCommandResult only on success; a nonzero exit writes an error retaining the result, target and dispatch metadata.

Notes

Arguments can mutate tmux or run application commands. WhatIf performs no dispatch. Confirmation shows the command name without exposing the full argument content. Cancellation does not prove a dispatched mutation was rolled back; do not retry uncertain mutations automatically.

Command details#

Command type
cmdlet
Confirmation
Supports -WhatIf and -Confirm ; confirm impact: Medium.
Positional binding
Enabled.
Pipeline inputs
LibTmux.Server : Native pipeline type for this command.
Outputs
LibTmux.TmuxCommandResult

Examples#

Example 1 Read the version of the existing server identified by $SocketPath . View source

Terminal window
$arguments = @('display-message', '-p', '#{version}')
LibTmux\New-TmuxServer -SocketPath $SocketPath |
LibTmux\Invoke-TmuxCommand -Arguments $arguments
Parameters
Common parameters 12

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

Returns

LibTmux.TmuxCommandResult : Native pipeline type for this command.

Discussed in Capture, refresh and raw commands

Esc

Type to search.

Reference preview Open reference