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
- New-TmuxCommand [-Name] <System
.String > [[-Arguments] <System.String []>] [<CommonParameters >] -
Description#
Createone nativeTmuxCommandwith 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-TmuxChainorInvoke-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.InvalidCommandterminates 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
-
-
A tmux command name or alias. Empty, whitespace, NUL and leading global options are rejected.
- Required
- Yes
- Position
- 0
- Pipeline input
- No
- Validation
ValidateNotNullOrEmpty()
-
-Arguments(System.String []) #Literal command arguments. The default is an empty array.
- Required
- No
- Position
- 1
- Pipeline input
- No
- Validation
ValidateNotNull()
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.TmuxCommand: A native command value; no execution result.
Discussed in Commands and control clients , Getting started · Dispatch, completion, and failure