# types.NewSessionOptions.groupWith

- **Module:** types
- **Package:** libtmux
- **Language:** TypeScript
- **Kind:** property
- **Source:** https://github.com/libtmux/libtmux-ts/blob/073b9d7dedad900bff6f5ec0ea47794e40225870/packages/libtmux/src/types.ts#L78
- **Page:** https://libtmux.org/en/ts/latest/reference/types-newsessionoptions-groupwith/

Share another session's windows, tmux's `-t`.

Names a session to group with, not a group: tmux puts the new session in
that session's group, or starts one named for it. Members share one window
list, so a window created in either appears in both and a window moved in
either moves in both — unlike a linked window, where each session keeps its
own list and its own index for it.

The group a session ended up in is [`Session`](/en/ts/latest/reference/session-session/)`.group`. [`windowName`](/en/ts/latest/reference/types-newsessionoptions-windowname/),
[`shellCommand`](/en/ts/latest/reference/types-newsessionoptions-shellcommand/) and [`startDirectory`](/en/ts/latest/reference/types-newsessionoptions-startdirectory/) describe a first window, and a grouped
session does not make one, so tmux ignores them here.
