Core LibraryAPI Reference

Choose documentation 2

latest

Current version

latest
English

Prerelease This site documents an alpha of libtmux. Its structure, URLs and APIs are subject to change.

cmdlet libtmux-powershell latest

LibTmux.Split-TmuxPane

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

Description#

Split a native Pane directly 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 native LibTmux.Pane for the new pane and does not refresh the original handle in place.

Notes

WhatIf performs 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 use Tmux.PaneSplitFailed and retain the core exception and failed pane. ErrorAction Continue 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 -WhatIf and -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 source

Terminal 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
Common parameters 12

PowerShell supplies these parameters. See common parameter behavior for their effects.

Returns

LibTmux.Pane : Captured native object for the created resource.

Discussed in Create windows and panes · Create sessions, windows and panes

Esc

Type to search.

Reference preview Open reference