Core LibraryunreleasedAPI reference

Choose documentation 3

latest

Current version

latest
English

Unreleased LibTmux has not been released. Its API may change during development. This site's structure and URLs may change too.

MoreLess about this notice

function LibTmux.jl

new_session

Source and package
Qualified name
LibTmux.new_session
Module
LibTmux
Package
LibTmux
Source
src/operations.jl

Methods

new_session( connection::LibTmux.ControlConnection; name, command, shell_command, start_directory, environment, kwargs..., )[source]

Create a detached session on the connected daemon and return its SessionRef. Command, directory and environment options follow the subprocess method. Names must be valid UTF-8 without control bytes; tmux's name normalization still applies. The connection pins daemon identity and the prefixed reply verifies that identity. Cancellation after submission may leave a created session; no retry or automatic destruction occurs. The returned session is caller-owned.

new_session(connection::ControlConnection; name, kwargs...)

new_session( server::LibTmux.Server; name, command, shell_command, start_directory, environment, kwargs..., )[source]

Create a detached session and return its generation-bound SessionRef. command is an argv vector; shell_command explicitly runs /bin/sh -c. An executable name beginning with - requires ./-name or an absolute path; arguments after the executable may begin with -. Omitting both uses tmux's configured default command. Creation can start a daemon at this endpoint. The returned reference does not own automatic cleanup. environment is a mapping or pairs of portable names to literal string values, passed at creation without format expansion. Duplicate names are rejected.

new_session(server; name, command=nothing, shell_command=nothing,
start_directory=nothing, environment=(), timeout=5.0, cancel=nothing, strict=false)

Subprocess identity checks are best effort. strict=true refuses execution; there is no silent downgrade or replay after uncertain failure. An invalid creation reply raises CreationResponseError with command evidence.

Recorded calls

source calls
No call edges in the Julia model.

The Julia 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.new_session.

tmux command

task material

The tmux commands behind new_session.

tmux C API

task material

The C declarations in tmux that implement these commands.

Each path starts at a function a command runs, which is degree 1. The degree counts steps from there along the path, and each step is a call or a reference: degree 2 is reached from that function, degree 3 from the next, and so on.

Create a session and its first pane

  1. 1 cmd_new_session_exec
  2. calls → 2 spawn_window
  3. calls → 3 spawn_pane
  4. calls → 4 window_add_pane
  5. calls → 5 window_pane_create

Guides

task material

Pages that discuss new_session.

Esc
Search in

Type to search.

Reference previewOpen reference