# LibTmux.list_environment

- **Module:** LibTmux
- **Package:** LibTmux
- **Language:** Julia
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-julia/blob/0e761d353bc0606f69ad87994958d09a92c7f7d1/src/configuration.jl#L628
- **Page:** https://libtmux.org/en/julia/latest/reference/libtmux-list_environment/

```
list_environment(
    server::LibTmux.Server,
    scope;
    inherit,
    max_bytes,
    kwargs...,
)
```

## Methods

Return captured `name => EnvironmentValue` pairs, including hidden entries and removal markers. Scopes are `:global` or `SessionRef`. Session entries override global entries, including explicit removals. Values retain literal newlines, quotes and backslashes; shell-style replies are never evaluated. Names outside `[A-Za-z_][A-Za-z0-9_]*` raise `UnsupportedCapability` rather than disappear. Hidden, visible and inherited rows span separate bounded observations.

```julia
list_environment(server, scope; inherit=false, max_bytes=1048576, kwargs...)
```

## Parameters

- `server` (`LibTmux.Server`)
- `scope` (`Any`)
- `inherit` (`Bool`)
  Default: `false`.
- `max_bytes` (`Int`)
  Default: `1024 ^ 2`.
- `kwargs`

## Guides

Pages that discuss `list_environment`.

- [Ownership and I/O](/en/julia/latest/topics/ownership/)
