LibTmux.Send-TmuxText
LibTmux\Send-TmuxText Send literal text and optional Enter to a native pane.
Source and package
- Declared in
- LibTmux
- Package
- LibTmux
- Source
- src/LibTmux.PowerShell/SendTmuxTextCommand.cs
- Send-TmuxText [-Pane] <Lib
Tmux > [-Text] <System.Pane .String > [-Enter] [-WhatIf ] [-Confirm] [<CommonParameters >] -
Description#
Text is literal: key names, leading dashes, semicolons and tmux format markers remain text.
Enteris sent only when requested. Newlines already present in Text are delivered regardless of theEnterswitch; they can execute commands in the receiving shell or application. NUL characters are rejected before I/O.An empty string is accepted, including with
Enterto send just that key.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.TextSendFailedand retain the original core exception, its dispatch information and the failed pane.ErrorActionContinue permits later owners to be processed;ErrorActionStop stops on the first failure. NUL content usesTmux.InvalidInputbefore dispatch; PowerShell handles parameter binding errors. Cancellation stops pending work but cannot undo delivered input. Nothing is retried. If text was sent but the followingEnterfails, the core reports unknown partial dispatch. Retrying the whole operation can duplicate effects.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-TmuxText -Text '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()
-
Literal text to send. Empty text is valid; NUL is unsupported. Newlines and control characters can affect the receiving application.
- Required
- Yes
- Position
- 1
- Pipeline input
- No
- Validation
ValidateNotNull()
-
-Enter(System.Management ) #.Automation .Switch Parameter Send one
Enterkey after the literal text. Omitted by default.- Required
- No
- Position
- Named
- Pipeline input
- No
- Switch
- Yes
-
-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