Core Library0.xAPI Reference

Choose documentation 3

latest

Current version

latest
English

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

method libtmux-ts latest

Session.fromEnv

Resolve the session this process is running inside.

Source and package
Qualified name
Session.fromEnv
Module
session
Declared in
Session
Package
libtmux
Source
packages/libtmux/src/session.ts
Other languages
PowerShell Julia Elixir Python Ruby Lua Rust Go Java C# C++ Swift Kotlin Scala F#
static async fromEnv( environment: Readonly< Record<string, string | undefined> > = process.env, ): Promise<Session>

Description#

The pane is authoritative: TMUX's exported session id goes stale when a pane is moved, so the session is looked up through TMUX_PANE instead.

Examples#

const current = await Session.fromEnv();
current.name;
Parameters

Guides#

Pages that discuss fromEnv.

In other ports#

The session this process is running inside

Equivalents of The session this process is running inside in other languages
Language Equivalent
Python libtmux.Session.from_env
Rust session.Session.from_env
Go no equivalent on Session
Java no equivalent on Session
C# LibTmux.Session.FromEnvironmentAsync
C++ no equivalent on Session
Swift no equivalent on Session

No equivalent is recorded in Ruby, Lua, PowerShell, Julia, Elixir, Kotlin, Scala or F#.

Esc

Type to search.

Reference previewOpen reference