Pane.split/3
Splits an exact pane and returns its ID and optional bound reference as value.
Source and package
- Qualified name
-
LibTmux .Pane .split/3 - Module
- LibTmux
- Declared in
- Pane
- Package
- libtmux
- Source
- lib/libtmux/entities.ex
- split(connection, ref, options \\ []) @spec split(Lib
Tmux (), Lib.Action .connection Tmux (), [ split.Ref .t _option () ]) :: {:ok, LibTmux (split.Action .result _value ())} | {:error, LibTmux ()}.Action .error -
Description#
A completed value contains
idandref. Qualified control binds the reference. Use it for another action without recapturing. It identifies the pane in that server incarnation, contains no fresh fields and does not reserve its lifetime. Closing the connection does not invalidate the reference while the pane and server remain. One-shot execution does not establish this binding and returnsref: nil. Unsuccessful split results havevalue: nil.Defaults: vertical split, half size, detached, after the target, and tmux's session default shell/command and directory.
axis: :horizontalplaces panes side by side;size: {:percent, n}uses-l n%on every supported release. Optionalcwdis literal format text. Choosecommand: :default,:empty,{:shell, nonempty_bytes}or{:argv, [program | arguments]}. Shell text uses the session's configured shell; argv usesexecvpsemantics, including PATH lookup and executable-text fallback. Empty argv/program and empty explicit shell text are rejected. At most 64 argv entries and the existing command byte bounds apply; bytes must be NUL-free.Singleton argv uses the packaged helper to preserve exactly one argument. It replaces itself with the pane program. tmux retains the helper path in
pane_start_command; commandless respawn requires that installation to remain available. See command forms. Split acknowledgement does not prove program startup or completion.session: session_refselects exact membership/context, not a WindowLink index.timeoutdefaults to 5000ms. No snapshot is changed; capture again when a new observation is needed. SeeLibTmux.Actionfor outcomes and the one-shot identity check/use limitation.alias LibTmux.Pane
{:ok, %{outcome: :completed, value: %{ref: created}}} = Pane.split(control, pane_ref, axis: :horizontal, size: {:percent, 30}) Pane.send_text(control, created, "hello")
- Parameters
-
-
ref(LibTmux ()) #.Ref .t -
options([split_option ()]) #