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.ConvertTo-TmuxQueryJson

LibTmux\ConvertTo-TmuxQueryJson LibTmux\ConvertTo-TmuxQueryJson

Serialize a native query document.

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

Description#

Serialize a native query document through LibTmux.Query.Json. The returned string uses the shared schema 2 contract. Serialization performs no tmux I/O. Restore the document with New-TmuxQuery -Json.

Notes

Tmux.QueryJsonFailed terminates invalid serialization.

Command details#

Command type
cmdlet
Positional binding
Enabled.
Pipeline inputs
LibTmux.Query.QueryDocument : Native query documents.
Outputs
System.String

Examples#

Example 1 Serialize a pane-width filter for storage or another native consumer. View source

Terminal window
LibTmux\New-TmuxQuery -Target Pane -Criteria @{ Width = @{ Ge = 80 } } |
LibTmux\ConvertTo-TmuxQueryJson
Parameters
Common parameters 12

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

Returns

System.String : One JSON string per document.

Discussed in Filter and query tmux objects

Esc

Type to search.

Reference preview Open reference