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.Send-TmuxKey

LibTmux\Send-TmuxKey LibTmux\Send-TmuxKey

Send an ordered sequence of tmux key tokens to a native pane.

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

Description#

Each array element is interpreted by tmux as a key token, such as C-a or Enter. Unrecognized key names follow tmux's character-sending behavior. No additional Enter is appended. Null, empty and NUL-containing tokens are rejected before I/O. The command owns a snapshot of the supplied array.

Keys run in input order through one core command chain. A failure can leave earlier keys delivered and prevent later keys from running.

The endpoint and daemon generation come from the supplied native pane. -WhatIf performs no acquisition or sending. Confirmation names the endpoint and pane without displaying the supplied text or keys. Successful sending confirms tmux accepted input; use an explicit application readiness signal before checking that a command has finished.

Notes

Failures use Tmux.KeySendFailed and retain the original core exception, its dispatch information and the failed pane. -ErrorAction Continue permits later owners to be processed; -ErrorAction Stop stops on the first failure. NUL and invalid key-token content use Tmux.InvalidInput before dispatch; PowerShell handles parameter binding errors. Cancellation stops pending work but cannot undo delivered input. Nothing is retried.

Command details#

Command type
cmdlet
Confirmation
Supports -WhatIf and -Confirm ; confirm impact: Medium.
Positional binding
Enabled.
Pipeline inputs
LibTmux.Pane : A native pane selected from an explicit endpoint.
Outputs
System.Void

Examples#

Example 1 Use a previously selected native $pane on an endpoint you own. View source

Terminal window
$pane | LibTmux\Send-TmuxKey -Key @('C-a', 'Enter') -Confirm:$false
Parameters
Common parameters 12

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

Returns

None: No success objects are emitted. An empty owner pipeline performs no work.

Discussed in Send input to a pane · Dispatch, completion, and failure

Esc

Type to search.

Reference preview Open reference