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.

method libtmux-perl latest

Server.set_environment

set_environment(name => env_name, value => bytes, session => session_target?).

Source and package
Qualified name
LibTmux::Server::set_environment
Module
LibTmux
Declared in
Server
Package
LibTmux
Source
packages/core/lib/LibTmux/Server.pm
Other languages
Erlang PowerShell Julia Elixir Haskell Common Lisp PythonRubyLuaTypeScriptRustGo Java C# C++ Swift Kotlin Scala OCaml F# Clojure
sub set_environment($self, %args)

Description#

Set a literal environment value for a LibTmux::Session handle or explicit session ID, or globally when session is omitted. Empty text and '0' remain values. Existing pane processes are unaffected; creation-time environment belongs to "new_session", "new_window", and "split_pane". Captured handles are checked against the connected daemon generation before dispatch; stale handles throw "StaleReference" in LibTmux::X. Raw IDs target the current session. The probe and mutation remain separate operations.

Returns undef after command acceptance. Performs I/O; failures propagate through LibTmux::X. Captured objects are not modified.

$server->set_environment(session => $session, name => 'BUILD', value => '0');

Methods#

Parameters

tmux command#

The tmux commands behind set_environment.

tmux C API#

The C declarations in tmux that implement these commands.

In other ports#

Set a variable in the server's environment

Equivalents of Set a variable in the server's environment in other languages
Language Equivalent
Python libtmux.Server.set_environment
Ruby LibTmux::Server#set_environment
Lua libtmux.Server:set_environment
Haskell No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing.
TypeScript server.Server.setEnvironment
Rust server.Server.set_environment
Go tmux.Server.SetEnvironment
Java no equivalent on Server
C# no equivalent on Server
C++ no equivalent on Server
Swift Server.setEnvironment(_:to:in:)
OCaml Libtmux_unix.Client.set_environment

No equivalent is recorded in PowerShell, Julia, Erlang, Elixir, Common Lisp, Clojure, Kotlin, Scala or F#.

Set a variable in a session's environment

Equivalents of Set a variable in a session's environment in other languages
Language Equivalent
Python libtmux.Session.set_environment
Ruby LibTmux::Session#set_environment
Lua libtmux.Session:set_environment
Haskell No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing.
TypeScript session.Session.setEnvironment
Rust session.Session.set_environment
Go tmux.Session.SetEnvironment
Java no equivalent on Session
C# no equivalent on Session
C++ no equivalent on Session
Swift Server.setEnvironment(_:to:in:)
OCaml Libtmux_unix.Client.set_environment

No equivalent is recorded in PowerShell, Julia, Erlang, Elixir, Common Lisp, Clojure, Kotlin, Scala or F#.

Esc

Type to search.

Reference previewOpen reference