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.Select-TmuxPane

LibTmux\Select-TmuxPane LibTmux\Select-TmuxPane

Filter captured native panes.

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

Description#

Evaluate criteria against captured native objects using the shared .NET query evaluator. Selection preserves input order, duplicates, object identity and the complete graph behind each object. It does not contact tmux or refresh data. Use Where-Object when an ordinary PowerShell predicate is sufficient.

Ordinary selection streams each match. ExactlyOne retains a match until finite input completes, then emits it only if exactly one input matched. A second match, invalid object, unavailable captured relation, evaluation failure or pipeline stop terminates selection before that retained object is emitted. ExactlyOne counts only the successful objects it receives. An upstream nonterminating error is outside that guarantee. When completeness is required before mutation, use -ErrorAction Stop on every upstream acquisition.

Notes

Errors terminate even with -ErrorAction Continue. Tmux.NoMatch and Tmux.MultipleMatches report cardinality failures. Tmux.InvalidQuery reports invalid criteria or a mismatched target; Tmux.QuerySelectionFailed retains the native evaluation exception and failing input. ExactlyOne cannot prove cardinality on an input stream that never completes.

Command details#

Command type
cmdlet
Default parameter set
Criteria
Positional binding
Enabled.
Pipeline inputs
LibTmux.Pane : Captured native panes; no property-name binding.
Outputs
LibTmux.Pane

Examples#

Example 1 Capture the existing endpoint selected by $SocketPath , then select panes at least 80 columns wide. View source

Terminal window
$snapshot = LibTmux\New-TmuxServer -SocketPath $SocketPath |
LibTmux\Get-TmuxSnapshot
$snapshot.Panes |
LibTmux\Select-TmuxPane -Criteria @{ Width = @{ Ge = 80 } }
Parameters
Common parameters 12

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

Returns

LibTmux.Pane : The original matching objects.

Discussed in Captured state and I/O , Local selection and source queries

Esc

Type to search.

Reference preview Open reference