Server.set_environment
set_environment(name => env_name, value => bytes, session => session_target?).
Source and package
-
Description#
Set a literal environment value for a
LibTmux::Sessionhandle 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
undefafter command acceptance. Performs I/O; failures propagate throughLibTmux::X. Captured objects are not modified.$server->set_environment(session => $session, name => 'BUILD', value => '0');Methods#
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
| Language | Equivalent |
|---|---|
| Python | libtmux |
| Ruby | Lib |
| Lua | libtmux |
| Haskell | No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing. |
| TypeScript | server |
| Rust | server |
| Go | tmux |
| Java | no equivalent on Server |
| C# | no equivalent on Server |
| C++ | no equivalent on Server |
| Swift | Server |
| OCaml | Libtmux |
No equivalent is recorded in PowerShell, Julia, Erlang, Elixir, Common Lisp, Clojure, Kotlin, Scala or F#.
Set a variable in a session's environment
| Language | Equivalent |
|---|---|
| Python | libtmux |
| Ruby | Lib |
| Lua | libtmux |
| Haskell | No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing. |
| TypeScript | session |
| Rust | session |
| Go | tmux |
| Java | no equivalent on Session |
| C# | no equivalent on Session |
| C++ | no equivalent on Session |
| Swift | Server |
| OCaml | Libtmux |
No equivalent is recorded in PowerShell, Julia, Erlang, Elixir, Common Lisp, Clojure, Kotlin, Scala or F#.