LibTmux.Split-TmuxPane
LibTmux\Split-TmuxPane Split an explicit pane and return the newly created pane.
Source and package
- Declared in
- LibTmux
- Package
- LibTmux
- Source
- src/LibTmux.PowerShell/SplitTmuxPaneCommand.cs
- Cells (default): Split-TmuxPane [-Pane] <Lib
Tmux > [-Horizontal] [-Before] [-Size <System.Pane .Nullable [System.Int32 ]>] [-StartDirectory <System.String >] [-Command <System.String >] [-Environment <System.Collections >] [-Activate] [-Full.IDictionary Window ] [-Zoom] [-WhatIf ] [-Confirm] [<CommonParameters >] Percentage: Split-TmuxPane [-Pane] <LibTmux > [-Horizontal] [-Before] -Percentage <System.Pane .Nullable [System.Int32 ]> [-StartDirectory <System.String >] [-Command <System.String >] [-Environment <System.Collections >] [-Activate] [-Full.IDictionary Window ] [-Zoom] [-WhatIf ] [-Confirm] [<CommonParameters >] -
Description#
Split a native
Panedirectly or through the pipeline. By default the new pane is below its target and remains unselected. Horizontal chooses a left/right split; Before places the new pane above or left of the target. Success returns the captured nativeLibTmux.Panefor the new pane and does not refresh the original handle in place.Notes
WhatIfperforms no core discovery or dispatch and emits no pane. Confirmation precedes the core operation. The caller remains responsible for the created pane and its process. Cancellation is not rollback and no mutation is retried. Per-owner errors useTmux.PaneSplitFailedand retain the core exception and failed pane.ErrorActionContinue allows later owners to run. The core and tmux enforce geometry and version capabilities.Command details#
- Command type
cmdlet- Default parameter set
- Cells
- Confirmation
- Supports
-WhatIfand-Confirm; confirm impact: Medium. - Positional binding
- Enabled.
- Pipeline inputs
-
LibTmux.Pane: Native pipeline type for this command. - Outputs
-
LibTmux.Pane
Examples#
Example 1 Place a new twenty-column pane to the left of the first pane on the server identified by
$SocketPath. The window must have enough room. The current pane selection is preserved; the new /bin/sh process remains running until you remove its pane. View sourceTerminal window LibTmux\New-TmuxServer -SocketPath $SocketPath |LibTmux\Get-TmuxPane | Select-Object -First 1 |LibTmux\Split-TmuxPane -Horizontal -Before -Size 20 -Command 'exec /bin/sh'- Parameters
-
-
Native pane to split. This is the only pipeline-bound parameter; binding by an object's
Paneproperty is not supported.- Required
- Yes
- Position
- 0
- Pipeline input
- By value
- Validation
ValidateNotNull()
-
-Horizontal(System.Management ) #.Automation .Switch Parameter Split left to right instead of top to bottom. Without Before the new pane is on the right.
- Required
- No
- Position
- Named
- Pipeline input
- No
- Switch
- Yes
-
-Before(System.Management ) #.Automation .Switch Parameter Place the new pane above the target, or on its left when Horizontal is present.
- Required
- No
- Position
- Named
- Pipeline input
- No
- Switch
- Yes
-
-Size(System.Nullable [System.Int32 ]) (forCells) #New pane size in cells, at least 1: columns for a horizontal split or rows otherwise. Size and
Percentagecannot be combined. Omit both to use tmux's default split size.- Required
- No
- Position
- Named
- Pipeline input
- No
- Validation
ValidateRange(1, 2147483647)
-
-StartDirectory(System.String ) #Working directory for the new pane. Use an absolute filesystem path for predictable behavior. The core expands ~ and ~/; this cmdlet does not resolve PowerShell provider paths or change the host's current directory.
- Required
- No
- Position
- Named
- Pipeline input
- No
- Validation
ValidateNotNullOrEmpty()
-
Oneshell-command string for the new pane. tmux interprets shell syntax in this string; it is not an argument array. Omit it to use the configured default command or shell.- Required
- No
- Position
- Named
- Pipeline input
- No
- Validation
ValidateNotNullOrEmpty()
-
-Environment(System.Collections ) #.IDictionary A dictionary with string names and string values. Names must be nonempty and contain neither '=' nor NUL (U+0000). Values may be empty but must not contain NUL. Null or non-string entries are rejected before confirmation or dispatch. Entries are copied for this invocation and do not change the PowerShell host environment.
- Required
- No
- Position
- Named
- Pipeline input
- No
- Validation
ValidateNotNull()
-
-Activate(System.Management ) #.Automation .Switch Parameter Make the new pane active. By default the previously active pane remains active; this switch does not attach a terminal.
- Required
- No
- Position
- Named
- Pipeline input
- No
- Switch
- Yes
-
-FullWindow(System.Management ) #.Automation .Switch Parameter Split across the whole window instead of only the target pane.
- Required
- No
- Position
- Named
- Pipeline input
- No
- Switch
- Yes
-
-Zoom(System.Management ) #.Automation .Switch Parameter Ask tmux to zoom the new pane.
- Required
- No
- Position
- Named
- Pipeline input
- No
- Switch
- Yes
-
-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
-
-Percentage(System.Nullable [System.Int32 ]) (forPercentage) #New pane size as a percentage from 1 through 100.
Percentageand Size cannot be combined. The requested geometry must still fit the window.- Required
- Yes
- Position
- Named
- Pipeline input
- No
- Validation
ValidateRange(1, 100)
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.Pane: Captured native object for the created resource.
Discussed in Create windows and panes · Create sessions, windows and panes