LibTmux.Get-TmuxPaneContent
LibTmux\Get-TmuxPaneContent Capture rendered text from a pane.
Source and package
- Declared in
- LibTmux
- Package
- LibTmux
- Source
- src/LibTmux.PowerShell/GetTmuxPaneContentCommand.cs
- History: Get-TmuxPaneContent [-Pane] <Lib
Tmux > [-End.Pane Line <System.Nullable [System.Int32 ]>] -History [-Raw] [-EscapeSequences ] [-EscapeNon ] [-JoinPrintable Wrapped ] [-PreserveLines Trailing ] [-TrimSpaces Trailing ] [-AlternateSpaces Screen ] [-Quiet] [-ModeScreen ] [-Pending] [-Hyperlinks] [-LineNumbers ] [-LineFlags ] [<CommonParameters >] Range (default): Get-TmuxPaneContent [-Pane] <LibTmux > [-Start.Pane Line <System.Nullable [System.Int32 ]>] [-EndLine <System.Nullable [System.Int32 ]>] [-Raw] [-EscapeSequences ] [-EscapeNon ] [-JoinPrintable Wrapped ] [-PreserveLines Trailing ] [-TrimSpaces Trailing ] [-AlternateSpaces Screen ] [-Quiet] [-ModeScreen ] [-Pending] [-Hyperlinks] [-LineNumbers ] [-LineFlags ] [<CommonParameters >] -
Description#
Read a native pane through the core capture request. By default each captured line is a separate string. Raw returns one string joined with LF, without inventing a trailing newline. History starts at the beginning of retained history; StartLine and EndLine select explicit bounds.
Notes
Capture is rendered terminal text, not a byte-exact output stream or proof that a shell command completed. History and StartLine are exclusive.
PreserveTrailingSpacesandTrimTrailingSpacescannot both be selected. Core capability checks govern flags on older tmux versions.Command details#
- Command type
cmdlet- Default parameter set
- Range
- Positional binding
- Enabled.
- Pipeline inputs
-
LibTmux.Pane: Native pipeline type for this command. - Outputs
-
System.String
Examples#
Example 1 Capture the first pane on the existing server identified by
$SocketPath. View sourceTerminal window LibTmux\New-TmuxServer -SocketPath $SocketPath |LibTmux\Get-TmuxPane |Select-Object -First 1 |LibTmux\Get-TmuxPaneContent -Raw- Parameters
-
-
The pane to capture.
- Required
- Yes
- Position
- 0
- Pipeline input
- By value
- Validation
ValidateNotNull()
-
-EndLine(System.Nullable [System.Int32 ]) #The last line, relative to the visible pane.
- Required
- No
- Position
- Named
- Pipeline input
- No
-
-History(System.Management ) (for.Automation .Switch Parameter History) #Whether capture starts at the oldest retained history.
- Required
- Yes
- Position
- Named
- Pipeline input
- No
- Switch
- Yes
-
-Raw(System.Management ) #.Automation .Switch Parameter Whether lines are joined with lf into one rendered string.
- Required
- No
- Position
- Named
- Pipeline input
- No
- Switch
- Yes
-
-EscapeSequences(System.Management ) #.Automation .Switch Parameter Whether terminal escape sequences are retained.
- Required
- No
- Position
- Named
- Pipeline input
- No
- Switch
- Yes
-
-EscapeNonPrintable(System.Management ) #.Automation .Switch Parameter Whether nonprintable bytes use octal escapes.
- Required
- No
- Position
- Named
- Pipeline input
- No
- Switch
- Yes
-
-JoinWrappedLines(System.Management ) #.Automation .Switch Parameter Whether wrapped screen lines are joined.
- Required
- No
- Position
- Named
- Pipeline input
- No
- Switch
- Yes
-
-PreserveTrailingSpaces(System.Management ) #.Automation .Switch Parameter Whether trailing spaces are retained.
- Required
- No
- Position
- Named
- Pipeline input
- No
- Switch
- Yes
-
-TrimTrailingSpaces(System.Management ) #.Automation .Switch Parameter Whether trailing spaces are removed.
- Required
- No
- Position
- Named
- Pipeline input
- No
- Switch
- Yes
-
-AlternateScreen(System.Management ) #.Automation .Switch Parameter Whether the alternate screen is captured.
- Required
- No
- Position
- Named
- Pipeline input
- No
- Switch
- Yes
-
-Quiet(System.Management ) #.Automation .Switch Parameter Whether a missing alternate screen returns empty content.
- Required
- No
- Position
- Named
- Pipeline input
- No
- Switch
- Yes
-
-ModeScreen(System.Management ) #.Automation .Switch Parameter Whether the pane's mode screen is captured.
- Required
- No
- Position
- Named
- Pipeline input
- No
- Switch
- Yes
-
-Pending(System.Management ) #.Automation .Switch Parameter Whether incomplete pending output is captured.
- Required
- No
- Position
- Named
- Pipeline input
- No
- Switch
- Yes
-
-Hyperlinks(System.Management ) #.Automation .Switch Parameter Whether supported captures include hyperlinks.
- Required
- No
- Position
- Named
- Pipeline input
- No
- Switch
- Yes
-
-LineNumbers(System.Management ) #.Automation .Switch Parameter Whether supported captures include line numbers.
- Required
- No
- Position
- Named
- Pipeline input
- No
- Switch
- Yes
-
-LineFlags(System.Management ) #.Automation .Switch Parameter Whether supported captures include line flags.
- Required
- No
- Position
- Named
- Pipeline input
- No
- Switch
- Yes
-
-StartLine(System.Nullable [System.Int32 ]) (forRange) #The first line; negative values address scrollback.
- Required
- No
- Position
- Named
- Pipeline input
- No
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
-
System.String: Native pipeline type for this command.
Discussed in Capture, refresh and raw commands , Send input to a pane