Core Library0.xAPI Reference

Choose documentation 2

latest

Current version

latest
English

Early release libtmux is released, and its APIs may still change between releases. This site's structure and URLs may change too.

cmdlet libtmux-powershell latest

LibTmux.Send-TmuxText

Send literal text and optional Enter to a native pane.

Source and package
Qualified name
LibTmux\Send-TmuxText
Declared in
LibTmux
Package
LibTmux
Source
src/LibTmux.PowerShell/SendTmuxTextCommand.cs

Description#

Text is literal: key names, leading dashes, semicolons and tmux format markers remain text. Enter is sent only when requested. Newlines already present in Text are delivered regardless of the Enter switch; they can execute commands in the receiving shell or application. NUL characters are rejected before I/O.

An empty string is accepted, including with Enter to send just that key.

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.TextSendFailed 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 content uses Tmux.InvalidInput before dispatch; PowerShell handles parameter binding errors. Cancellation stops pending work but cannot undo delivered input. Nothing is retried. If text was sent but the following Enter fails, the core reports unknown partial dispatch. Retrying the whole operation can duplicate effects.

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-TmuxText -Text '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.

tmux command#

The tmux commands behind Send-TmuxText.

tmux C API#

The C declarations in tmux that implement these commands.

Guides#

Pages that discuss Send-TmuxText.

Esc

Type to search.

Reference previewOpen reference