# tmux.AttachSessionOptions

- **Module:** tmux
- **Package:** github.com/libtmux/libtmux-go/tmux
- **Language:** Go
- **Kind:** struct
- **Source:** https://github.com/libtmux/libtmux-go/blob/5f808882015a975a65acc7f9da5b3ff0d5cbdc91/tmux/server_attach.go#L18
- **Page:** https://libtmux.org/reference/go/tmux-attachsessionoptions/

AttachSessionOptions configures terminal ownership and attach behavior shared by server- and session-scoped attachment. Nil StartDirectory omits its flag and a nonnil empty string is explicit; ClientFlags is copied. The Stdin, Stdout, and Stderr pointers are retained for the attach call and are never owned or closed by this package.

## Members

- `DetachOthers` (attribute) — DetachOthers disconnects other clients attached to the target session.
- `DetachParent` (attribute) — DetachParent detaches the invoking client from its parent session first.
- `NoUpdateEnvironment` (attribute) — NoUpdateEnvironment preserves the invoking client's environment.
- `ReadOnly` (attribute) — ReadOnly attaches the client with read-only permissions.
- `StartDirectory` (attribute) — StartDirectory selects the attached client's initial directory.
- `ClientFlags` (attribute) — ClientFlags are comma-joined client flags copied before attachment starts.
- `Stdin` (attribute) — Stdin is the attached tmux client's input stream; nil inherits process stdin.
- `Stdout` (attribute) — Stdout is the attached tmux client's output stream; nil inherits process stdout.
- `Stderr` (attribute) — Stderr is the attached tmux client's error stream; nil inherits process stderr.
