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-TmuxCommand

Construct a native tmux command without running it.

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

Description

Create one native TmuxCommand with literal argument boundaries. Construction performs no tmux I/O, starts no shell and copies the supplied string array. Empty strings remain arguments; null and NUL-containing arguments are rejected.

Use this value with Invoke-TmuxChain or Invoke-TmuxControlCommand. Values returned by native typed requests can be passed directly to those commands; reconstructing a typed request as raw text would discard its identity guards.

Notes

Tmux.InvalidCommand terminates invalid construction before any tmux I/O.

Command details

Command type
cmdlet
Positional binding
Enabled.
Pipeline inputs
None: No pipeline input.
Outputs
LibTmux.TmuxCommand
Parameters
Common parameters 12

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

Returns

LibTmux.TmuxCommand: A native command value; no execution result.

Examples

Example 1 Construct a command that prints text containing spaces and punctuation. View source

Terminal window
LibTmux\New-TmuxCommand -Name 'display-message' -Arguments @(
'-p', 'hello; tmux'
)

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-TmuxCommand.

Guides

task material

Pages that discuss New-TmuxCommand.

Esc
Search in

Type to search.

Reference previewOpen reference