LibTmux.New-TmuxQuery
LibTmux\New-TmuxQuery Build reusable criteria for captured tmux objects.
Source and package
- Declared in
- LibTmux
- Package
- LibTmux
- Source
- src/LibTmux.PowerShell/NewTmuxQueryCommand.cs
- Criteria (default): New-TmuxQuery -Target <Lib
Tmux > -Criteria <System.Query .Query Target .Collections > [<Common.IDictionary Parameters >] Json: New-TmuxQuery -Json <System.String > [<CommonParameters >] -
Description#
Construct a native
LibTmuxquery document from a criteria map or serialized schema 2 JSON. Construction copies and validates data without contacting tmux. UseWhere-Objectfor 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-TmuxQueryFieldlists native catalog fields and operator names. The criteria reference maps those names to accepted PowerShell keys such as Ge, Some and Is.Unknownfields, duplicate aliases, unsupported operators, ScriptBlocks, cycles and oversized data are rejected before evaluation.Notes
Tmux.InvalidQueryterminates 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
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 } }- Parameters
-
-
-Target(LibTmux ) (for.Query .Query Target Criteria) #The native entity described by Criteria.
- Required
- Yes
- Position
- Named
- Pipeline input
- No
- Validation
ValidateSet(["Session","Window","Pane"])
-
-Criteria(System.Collections ) (for.IDictionary Criteria) #A bounded data map. Values must have the native field type; strings and Boolean values are not converted to numbers.
- Required
- Yes
- Position
- Named
- Pipeline input
- No
- Validation
ValidateNotNull()
-
-Json(System.String ) (forJson) #A complete document serialized by ConvertTo-TmuxQueryJson. Only the current schema is accepted.
- Required
- Yes
- Position
- Named
- Pipeline input
- No
- Validation
ValidateNotNullOrEmpty()
Common parameters 12
PowerShell supplies these parameters. See common parameter behavior for their effects.
-
-Verbose(System.Management ) #.Automation .Switch Parameter Display verbose messages produced by this command.
Aliases:vbMicrosoft Learn reference -
-Debug(System.Management ) #.Automation .Switch Parameter Display debug messages produced by this command.
Aliases:dbMicrosoft Learn reference -
-ErrorAction(System.Management ) #.Automation .Action Preference Choose how this command responds to non-terminating errors.
Aliases:eaMicrosoft Learn reference -
-WarningAction(System.Management ) #.Automation .Action Preference Choose how this command responds to warning messages.
Aliases:waMicrosoft Learn reference -
-InformationAction(System.Management ) #.Automation .Action Preference Choose how this command handles information messages.
Aliases:infaMicrosoft Learn reference -
-ProgressAction(System.Management ) #.Automation .Action Preference Choose how this command handles progress updates.
Aliases:progaMicrosoft Learn reference -
-ErrorVariable(System.String ) #Store the command's error records in the named variable.
Aliases:evMicrosoft Learn reference -
-WarningVariable(System.String ) #Store the command's warning records in the named variable.
Aliases:wvMicrosoft Learn reference -
-InformationVariable(System.String ) #Store the command's information records in the named variable.
Aliases:ivMicrosoft Learn reference -
-OutVariable(System.String ) #Save output in the named variable while passing it down the pipeline.
Aliases:ovMicrosoft Learn reference -
Buffer output before passing it to the next pipeline command.
Aliases:obMicrosoft Learn reference -
-PipelineVariable(System.String ) #Make the most recent output object available through a named variable within the pipeline.
Aliases:pvMicrosoft Learn reference
-
- Returns
-
LibTmux.Query.QueryDocument:Onevalidated native document.
Discussed in Local selection and source queries