# types.NewSessionOptions.groupWith

- **Module:** types.NewSessionOptions
- **Package:** @libtmux/libtmux
- **Language:** TypeScript
- **Kind:** property
- **Source:** https://github.com/libtmux/libtmux-ts/blob/2cb93308200da38a26b59876618116850f110607/packages/libtmux/src/types.ts#L70
- **Page:** https://libtmux.org/reference/ts/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.group`. `windowName`,
`shellCommand` and `startDirectory` describe a first window, and a grouped
session does not make one, so tmux ignores them here.
