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

LibTmux\New-TmuxCommand LibTmux\New-TmuxCommand

Construct a native tmux command without running it.

Source and package
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

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'
)
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.

Discussed in Commands and control clients , Getting started · Dispatch, completion, and failure

Esc

Type to search.

Reference preview Open reference