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.

class libtmux-java latest

Environment

The environment tmux gives to processes it starts, at one scope.

Source and package
Qualified name
io.github.libtmux.Environment
Package
io.github.libtmux
Distribution
io.github.libtmux:libtmux
Source
libtmux/src/main/java/io/github/libtmux/Environment.java
class io.github.libtmux.Environment

Description#

tmux keeps one environment per server and one per session, and hands the result to every process it spawns afterwards. That is what this is for: a pane opened later sees what is set here, so it is how a program refreshes a value that goes stale in a long-lived session — SSH_AUTH_SOCK after reconnecting, a token, a display.

A scope is chosen when the view is obtained rather than passed to every call, as Options does, so a caller cannot read one scope and write another. There are only the two scopes, because tmux has only those two.

A name is in one of three states, and they are not the same question. It can be set to a value, which #get() answers. It can be removed, which is tmux's way of saying a new process should not inherit it even though the server's own environment has it — #isRemoved() answers that, and #get() is empty for it. Or it can simply be absent, which is both of those empty.

Members11#

  • all method Every name set at this scope, in tmux's order. Removed names are not values, so not here.
  • effective method What a process started from this scope is actually handed, both scopes taken together.
  • get method The value set for this name, or empty when it is removed or absent.
  • global method
  • isRemoved method Whether new processes are told not to inherit this name.
  • remove method Tells processes started after this not to inherit the name.
  • removed method Every name this scope tells a new process not to inherit.
  • session method
  • set method Sets a name to a literal value.
  • setExpanded method Sets a name to what a tmux format expands to now.
  • unset method Removes the name from this scope, so it is neither set nor marked.
Esc

Type to search.

Reference previewOpen reference