LibTmux.Send-TmuxKey
LibTmux\Send-TmuxKey Send an ordered sequence of tmux key tokens to a native pane.
Source and package
- Declared in
- LibTmux
- Package
- LibTmux
- Source
- src/LibTmux.PowerShell/SendTmuxKeyCommand.cs
- Send-TmuxKey [-Pane] <Lib
Tmux > [-Key] <System.Pane .String []> [-WhatIf ] [-Confirm] [<CommonParameters >] -
Description#
Each array element is interpreted by tmux as a key token, such as C-a or Enter. Unrecognized key names follow tmux's character-sending behavior. No additional Enter is appended. Null, empty and NUL-containing tokens are rejected before I/O. The command owns a snapshot of the supplied array.
Keysrun in input order through one core command chain. A failure can leave earlier keys delivered and prevent later keys from running.The endpoint and daemon generation come from the supplied native pane.
-WhatIfperforms no acquisition or sending. Confirmation names the endpoint and pane without displaying the supplied text or keys. Successful sending confirms tmux accepted input; use an explicit application readiness signal before checking that a command has finished.Notes
Failures use
Tmux.KeySendFailedand retain the original core exception, its dispatch information and the failed pane.-ErrorAction Continuepermits later owners to be processed;-ErrorAction Stopstops on the first failure. NUL and invalid key-token content useTmux.InvalidInputbefore dispatch; PowerShell handles parameter binding errors. Cancellation stops pending work but cannot undo delivered input. Nothing is retried.Command details#
- Command type
cmdlet- Confirmation
- Supports
-WhatIfand-Confirm; confirm impact: Medium. - Positional binding
- Enabled.
- Pipeline inputs
-
LibTmux.Pane: A native pane selected from an explicit endpoint. - Outputs
System.Void
Examples#
Example 1 Use a previously selected native
$paneon an endpoint you own. View sourceTerminal window $pane | LibTmux\Send-TmuxKey -Key @('C-a', 'Enter') -Confirm:$false- Parameters
-
-
The native pane selected from the endpoint you intend to change.
- Required
- Yes
- Position
- 0
- Pipeline input
- By value
- Validation
ValidateNotNull()
-
-Key(System.String []) #Key tokens in sending order. Use an array for a sequence and quote tokens such as 'C-a'. This command does not split one string on whitespace.
- Required
- Yes
- Position
- 1
- Pipeline input
- No
- Validation
ValidateNotNull()- Validation
ValidateCount(1, 2147483647)
-
-WhatIf(System.Management ) #.Automation .Switch Parameter Describe the intended input operation without acquiring or sending anything.
- Required
- No
- Position
- Named
- Pipeline input
- No
- Switch
- Yes
- Aliases
wi
-
-Confirm(System.Management ) #.Automation .Switch Parameter Prompts for confirmation before sending input.
- 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
-
None: No success objects are emitted. An empty owner pipeline performs no work.
Discussed in Send input to a pane · Dispatch, completion, and failure