# TmuxContext.current(environment:)

- **Module:** TmuxContext
- **Package:** libtmux-swift
- **Language:** Swift
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-swift/blob/254f8b2be7eb60cacc3ffcb3ea8e456784f582df/Sources/LibTmux/TmuxContext.swift#L75
- **Page:** https://libtmux.org/en/swift/latest/reference/tmuxcontext-current(environment-)/

```
TmuxContext.current(environment:)(environment: [String : String]) -> TmuxContext?
```

The context of the tmux this process is running inside, or `nil` when it is not running inside one.

- Parameter environment: where to read `$TMUX` from. Injectable so that
  a caller — or a test — can ask about an environment other than its own.
