LibTmux.Invoke-TmuxCommand
LibTmux\Invoke-TmuxCommand Execute literal tmux arguments against an explicit server.
Source and package
- Declared in
- LibTmux
- Package
- LibTmux
- Source
- src/LibTmux.PowerShell/InvokeTmuxCommandCommand.cs
- Invoke-TmuxCommand [-Server] <Lib
Tmux > [-Arguments] <System.Server .String []> [-WhatIf ] [-Confirm] [<CommonParameters >] -
Description#
Pass the tmux command name and arguments as a string array. The adapter invokes the core directly without a shell. It returns a native
TmuxCommandResultonly on success; a nonzero exit writes an error retaining the result, target and dispatch metadata.Notes
Arguments can mutate tmux or run application commands.
WhatIfperforms no dispatch. Confirmation shows the command name without exposing the full argument content. Cancellation does not prove a dispatched mutation was rolled back; do not retry uncertain mutations automatically.Command details#
- Command type
cmdlet- Confirmation
- Supports
-WhatIfand-Confirm; confirm impact: Medium. - Positional binding
- Enabled.
- Pipeline inputs
-
LibTmux.Server: Native pipeline type for this command. - Outputs
-
LibTmux.TmuxCommandResult
Examples#
Example 1 Read the version of the existing server identified by
$SocketPath. View sourceTerminal window $arguments = @('display-message', '-p', '#{version}')LibTmux\New-TmuxServer -SocketPath $SocketPath |LibTmux\Invoke-TmuxCommand -Arguments $arguments- Parameters
-
-
The endpoint that receives the command.
- Required
- Yes
- Position
- 0
- Pipeline input
- By value
- Validation
ValidateNotNull()
-
-Arguments(System.String []) #Literal arguments beginning with a tmux command name or alias. Global options such as
-S,-Land -f cannot replace the command name; configure the endpoint onServer. Invalid command names terminate before confirmation or dispatch.- Required
- Yes
- Position
- 1
- Pipeline input
- No
- Validation
ValidateNotNull()- Validation
ValidateCount(1, 2147483647)
-
-WhatIf(System.Management ) #.Automation .Switch Parameter Runs the command in a mode that only reports what would happen without performing the actions.
- Required
- No
- Position
- Named
- Pipeline input
- No
- Switch
- Yes
- Aliases
wi
-
-Confirm(System.Management ) #.Automation .Switch Parameter Prompts you for confirmation before running the cmdlet.
- Required
- No
- Position
- Named
- Pipeline input
- No
- Switch
- Yes
- Aliases
cf
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.TmuxCommandResult: Native pipeline type for this command.
Discussed in Capture, refresh and raw commands