Server.environment
Read one variable from the server's environment.
Source and package
- Qualified name
-
libtmux::server:: Server:: environment - Module
- server
- Declared in
Server- Package
- libtmux
- Source
- crates/libtmux/src/server/settings.rs
- Other languages
- Perlmethod Rakumethod Erlang PowerShell Julia Elixir Haskell Common Lisp PythonRubyLuaTypeScriptGo Java C# C++ Swift Kotlin Scala OCamlfunction F# Clojure
-
Description#
tmux keeps two different things under a name: a value, and a mark saying a process started from it must not inherit the name at all.
EnvironmentEntrykeeps them apart, because collapsing both to absence would hide the second, which a caller sets deliberately withSelf::hide_environment().Nonemeans tmux holds nothing under the name.Errors
Returns an error when tmux cannot be reached.
In other ports#
Read the server's global 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 |
| Go | tmux |
| Java | no equivalent on Server |
| C# | Lib |
| C++ | no equivalent on Server |
| Swift | Server |
| OCaml | Libtmux Pass Environment.Global for server values or Environment.Session with a bound session target. Acquisition is explicit. |
| Perl | No dedicated equivalent in the selected Perl surface. Explicit Server::cmd remains available for native tmux commands. |
| Raku | Lib Use the corresponding server or session environment facade. |
No equivalent is recorded in PowerShell, Julia, Erlang, Elixir, Common Lisp, Clojure, Kotlin, Scala or F#.
Read one variable from the server's environment
| Language | Equivalent |
|---|---|
| Python | no single-variable read; the whole table is returned |
| Haskell | No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing. |
| TypeScript | server |
| Go | tmux |
| Java | no single-variable read; the whole table is returned |
| C# | no single-variable read; the whole table is returned |
| C++ | no single-variable read; the whole table is returned |
| Swift | no single-variable read; the whole table is returned |
| OCaml | No direct public OCaml equivalent is recorded for this operation. |
| Perl | Lib Omit session for the global environment. Missing or explicitly unset values remain failures. |
| Raku | Lib |
No equivalent is recorded in Ruby, Lua, PowerShell, Julia, Erlang, Elixir, Common Lisp, Clojure, Kotlin, Scala or F#.