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.New-TmuxQuery

Build reusable criteria for captured tmux objects.

Source and package
Qualified name
LibTmux\New-TmuxQuery
Declared in
LibTmux
Package
LibTmux
Source
src/LibTmux.PowerShell/NewTmuxQueryCommand.cs

Description

Construct a native LibTmux query document from a criteria map or serialized schema 2 JSON. Construction copies and validates data without contacting tmux. Use Where-Object for ordinary PowerShell predicates; structured criteria also support serialization, field discovery and explicit source planning.

Map keys use native property names or catalog wire names. Bare values mean equality; fields in a map are combined with And. Use operator maps such as @{ Width = @{ Ge = 80 } }. Get-TmuxQueryField lists native catalog fields and operator names. The criteria reference maps those names to accepted PowerShell keys such as Ge, Some and Is. Unknown fields, duplicate aliases, unsupported operators, ScriptBlocks, cycles and oversized data are rejected before evaluation.

Notes

Tmux.InvalidQuery terminates invalid construction. The packaged libtmux-query-v2.schema.json describes the JSON representation.

Command details

Command type
cmdlet
Default parameter set
Criteria
Positional binding
Enabled.
Pipeline inputs
None: No pipeline input.
Outputs
LibTmux.Query.QueryDocument
Parameters
Common parameters 12

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

Returns

LibTmux.Query.QueryDocument: One validated native document.

Examples

Example 1 Build a reusable filter for panes at least 80 columns wide. View source

Terminal window
LibTmux\New-TmuxQuery -Target Pane -Criteria @{ Width = @{ Ge = 80 } }

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\New-TmuxQuery.

Guides

task material

Pages that discuss New-TmuxQuery.

Esc
Search in

Type to search.

Reference previewOpen reference