Core LibrarystableAPI Reference

Choose documentation 3

stable

Current version

stable
English

Prerelease This site documents an alpha of libtmux. Its structure, URLs and APIs are subject to change.

Python API

method libtmux stable

Session.set_environment

Set environment $ tmux set-environment <name> <value>.

Source and package
Qualified name
libtmux.Session.set_environment
Module
libtmux
Declared in
Session
Package
libtmux
Source
src/libtmux/common.py
Other languages
PowerShell Julia RubyLuaTypeScriptRustGo Java C# C++ Swift Kotlin Scala F#
set_environment ( self, name: str, value: str, expand_format: bool | None = None, hidden: bool | None = None, ) → None

Inherited from libtmux.common.EnvironmentMixin

Parameters
  • name (str) # – The environment variable name, e.g. 'PATH'.

  • value (str) # – Environment value.

  • expand_format (bool | None) # – Expand tmux format strings in the value (-F flag). added 0.56

  • hidden (bool | None) # – Mark the variable as hidden (-h flag). added 0.56

Raises

Discussed in Environment

In other ports Set a variable in a session's environment
Esc

Type to search.

Reference preview Open reference