Core LibraryunreleasedAPI Reference

Choose documentation 1

latest

Current version

latest
English

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

function libtmux-erlang latest

tmux_session:create/2

Create a detached session by default and explicitly observe the returned row. Options include name, window_name, dimensions, cwd, env and launch. Performs I/O; an observation failure after successful creation retains mutation = completed and the original command result. Existing names are not adopted.

Source and package
Qualified name
tmux_session:create/2
Declared in
tmux_session
Package
libtmux_erlang
Source
apps/libtmux_erlang/src/tmux_session.erl
Other languages
Perlmethod PowerShell Julia Elixir Haskell Common Lisp PythonRubyLuaTypeScriptRustGoJavaC#C++SwiftKotlinScalaOCaml F# Clojure
create(Server, Options) -spec create(tmux_server:t(), create_options()) -> {ok, tmux_model:session()} | {error, map()}.

tmux command#

The tmux commands behind create/2.

tmux C API#

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

In other ports#

Create a session

Equivalents of Create a session in other languages
Language Equivalent
Python libtmux.Server.new_session
Ruby LibTmux::Server#new_session
Lua libtmux.Server:new_session
Haskell No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing.
TypeScript server.Server.newSession
Rust server.Server.new_session
Go tmux.Server.NewSession
Java io.github.libtmux.Server.newSession
Clojure libtmux.core/new-session!
Kotlin io.github.libtmux.kotlin.Server.newSession
Scala io.github.libtmux.scaladsl.Server.newSession
C# LibTmux.Server.CreateSessionAsync
C++ libtmux::Server::new_session
Swift Server.newSession(named:startDirectory:windowName:width:height:environment:shell:)
OCaml Libtmux_unix.Client.create_session
Perl LibTmux::Server::new_session Explicit Server operation. Captured entities remain local observations; use a new snapshot to observe changes.

No equivalent is recorded in PowerShell, Julia, Elixir, Common Lisp or F#.

Esc

Type to search.

Reference previewOpen reference