Core LibraryunreleasedAPI Reference

Choose documentation 2

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.

function libtmux-ocaml latest

Client.create_session

Create a detached session on the bound daemon. Name collisions fail.

Source and package
Qualified name
Libtmux_unix.Client.create_session
Module
Libtmux_unix
Declared in
Client
Package
libtmux-unix
Source
unix/libtmux_unix.mli
Other languages
Perlmethod Erlang PowerShell Julia Elixir Haskell Common Lisp PythonRubyLuaTypeScriptRustGoJavaC#C++SwiftKotlinScala F# Clojure
val create_session : ?cancel:Cancellation.t -> ?window_name:string -> ?width:int -> ?height:int -> ?spawn:Libtmux.Spawn.t -> t -> name:string -> unit -> (Libtmux.Created.t, Libtmux.Error.t) result

Public owner: Libtmux_unix

Parameters

tmux command#

The tmux commands behind create_session.

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
Erlang tmux_session:create/2
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:)
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