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.

MoreLess about this notice

cmdlet libtmux-powershell

LibTmux.Select-TmuxWindow

Filter captured native windows.

Source and package
Qualified name
LibTmux\Select-TmuxWindow
Declared in
LibTmux
Package
LibTmux
Source
src/LibTmux.PowerShell/SelectTmuxWindowCommand.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.Window: Captured native windows; no property-name binding.
Outputs
LibTmux.Window
Parameters
Common parameters 12

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

Returns

LibTmux.Window: The original matching objects.

Examples

Example 1 Capture the existing endpoint selected by $SocketPath, then select active window placements. View source

Terminal window
$snapshot = LibTmux\New-TmuxServer -SocketPath $SocketPath |
LibTmux\Get-TmuxSnapshot
$snapshot.Windows |
LibTmux\Select-TmuxWindow -Criteria @{ IsActive = $true }

Recorded calls

source calls
No call edges in the PowerShell model.

The PowerShell reference records declarations, not calls, so this page shows no callers or callees. That is a limit of the extracted data, not a statement that nothing calls LibTmux\Select-TmuxWindow.

Guides

task material

Pages that discuss Select-TmuxWindow.

Esc
Search in

Type to search.

Reference previewOpen reference