tmux_set_environment
Set, remove, or unset environment variables in tmux sessions or globally. Manage variable inheritance for new panes and spawned commands.
Instructions
Set or unset an environment variable for a session (or globally).
Set global_=True (-g) to affect the global environment that new
sessions inherit, instead of one session. With a value, sets the
variable; commands spawned afterwards in that session's panes inherit it
(the race-free alternative to an export typed via send_keys).
To clear a variable, pass remove=True (-r, mark it for removal so the
child sees it unset even if it exists globally) or unset=True (-u,
delete it from this session's environment). session is the -t target.
Returns {"set"/"removed"/"unset": name, ...}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| value | No | ||
| global_ | No | ||
| remove | No | ||
| unset | No | ||
| session | No | ||
| target | No |