# TmuxContext.current(environment:)

- **Module:** TmuxContext
- **Package:** libtmux-swift
- **Language:** Swift
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-swift/blob/f02a4668570e1cc5198c941413750e021f42c214/Sources/LibTmux/TmuxContext.swift#L62
- **Page:** https://libtmux.org/reference/swift/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.
