Core Library0.xAPI reference

Choose documentation 1

pr-173

Current version

pr-173
English

Early release libtmux is released, and its APIs may still change between releases. This site's structure and URLs may change too.

MoreLess about this notice

function libtmux-elixir

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

Description

A completed value contains id and ref. 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 returns ref: nil. Unsuccessful outcomes return {:error, %LibTmux.Action.CompletionError{}} with the original result.

Defaults: vertical split, half size, detached, after the target, and tmux's session default shell/command and directory. axis: :horizontal places panes side by side; size: {:percent, n} uses -l n% on every supported release. Optional cwd is literal format text. Choose command: :default, :empty, {:shell, nonempty_bytes} or {:argv, [program | arguments]}. Shell text uses the session's configured shell; argv uses execvp semantics, 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_ref selects exact membership/context, not a WindowLink index. timeout defaults to 5000ms. No snapshot is changed; capture again when a new observation is needed. See LibTmux.Action for outcomes and the one-shot identity check/use limitation.

alias LibTmux.Pane

{:ok, %{value: %{ref: created}}} = Pane.split(control, pane_ref, axis: :horizontal, size: {:percent, 30}) Pane.send_text(control, created, "hello")

Recorded calls

source calls
No call edges in the Elixir model.

The Elixir reference records declarations, not calls, so this page shows no callers or callees. That is a limit of the extracted data, not a statement that nothing calls LibTmux.Pane.split/3.

Esc
Search in

Type to search.

Reference previewOpen reference